Module: Rodauth::Rails::App::Flash::RequestMethods
- Defined in:
- lib/rodauth/rails/app/flash.rb
Instance Method Summary collapse
- #commit_flash ⇒ Object
- #flash ⇒ Object
-
#redirect ⇒ Object
If the redirect would bubble up outside of the Roda app, the after hook would never get called, so we make sure to commit the flash.
Instance Method Details
#commit_flash ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/rodauth/rails/app/flash.rb', line 33 def commit_flash if ActionPack.version >= Gem::Version.new("5.0") rails_request.commit_flash else # ActionPack 4.2 automatically commits flash end end |
#flash ⇒ Object
29 30 31 |
# File 'lib/rodauth/rails/app/flash.rb', line 29 def flash rails_request.flash end |
#redirect ⇒ Object
If the redirect would bubble up outside of the Roda app, the after hook would never get called, so we make sure to commit the flash.
24 25 26 27 |
# File 'lib/rodauth/rails/app/flash.rb', line 24 def redirect(*) commit_flash super end |