Module: Devise::Models::Imprintable
- Defined in:
- lib/devise_imprintable/model.rb
Instance Method Summary collapse
Instance Method Details
#update_imprintable_fields!(request) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/devise_imprintable/model.rb', line 4 def update_imprintable_fields!(request) self.first_sign_in_at = self.first_sign_in_at || Time.now self.first_sign_in_ip = self.first_sign_in_ip || request.remote_ip save(:validate => false) or raise "Devise imprintable could not save #{inspect}." \ "Please make sure a model using imprintable can be saved at sign in." end |