Add modal controller to close Turbo Frame modals

This commit is contained in:
Andreas Nedbal 2022-11-24 22:55:12 +01:00
parent 0f760c0524
commit 1083d998a9
3 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,5 @@
# frozen_string_literal: true
class ModalController < ApplicationController
def close; end
end

View file

@ -0,0 +1 @@
= turbo_frame_tag :modal_container

View file

@ -171,5 +171,7 @@ Rails.application.routes.draw do
get "/.well-known/change-password", to: redirect("/settings/account")
post "/modal/close", to: "modal#close", as: :modal_close
puts "processing time of routes.rb: #{"#{(Time.zone.now - start).round(3).to_s.ljust(5, '0')}s".light_green}"
end