Module: Breath::SessionsControllerHelper
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/breath/controller/sessions_controller_helper.rb
Defined Under Namespace
Classes: InvalidPassword, InvalidPasswordConfirmation, TargetNotFound
Instance Method Summary collapse
Instance Method Details
#write_cookie(target_name, object) ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'lib/breath/controller/sessions_controller_helper.rb', line 51 def (target_name, object) if Rails.application.config.respond_to? :breath_expires .signed["#{target_name}_id".to_sym] = { value: object.id, expires: Rails.application.config.breath_expires } [:remember_token] = { value: object.remember_token, expires: Rails.application.config.breath_expires } else .permanent.signed["#{target_name}_id".to_sym] = object.id .permanent[:remember_token] = object.remember_token end end |