mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-13 21:33:20 +01:00
Add modal controller to close Turbo Frame modals
This commit is contained in:
parent
0f760c0524
commit
1083d998a9
3 changed files with 8 additions and 0 deletions
5
app/controllers/modal_controller.rb
Normal file
5
app/controllers/modal_controller.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ModalController < ApplicationController
|
||||
def close; end
|
||||
end
|
1
app/views/modal/close.html.haml
Normal file
1
app/views/modal/close.html.haml
Normal file
|
@ -0,0 +1 @@
|
|||
= turbo_frame_tag :modal_container
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue