Module: Rodauth::Rails::App::Flash::RequestMethods

Defined in:
lib/rodauth/rails/app/flash.rb

Instance Method Summary collapse

Instance Method Details

#commit_flashObject



34
35
36
# File 'lib/rodauth/rails/app/flash.rb', line 34

def commit_flash
  scope.rails_request.commit_flash
end

#flashObject



29
30
31
# File 'lib/rodauth/rails/app/flash.rb', line 29

def flash
  scope.rails_request.flash
end

#redirectObject

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