Module: Rails::AutomaticLogout::Controllers::Helpers::ClassMethods
- Defined in:
- lib/rails/automaticlogout/controllers/helpers.rb
Instance Method Summary collapse
Instance Method Details
#automatic_logout_at(time: 1.hour, message: "Session expired! You will be redirect.") ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/rails/automaticlogout/controllers/helpers.rb', line 22 def automatic_logout_at(time: 1.hour, message: "Session expired! You will be redirect.") prepend_before_filter do |c| if current_user c.session[:seconds] = expires_at_in_seconds(time) c.session[:message] = end end end |