Module: Sequel::Plugins::Devise::InstanceMethods
- Defined in:
- lib/sequel/plugins/devise.rb
Instance Method Summary collapse
-
#assign_attributes(hash) ⇒ Object
for database_authenticatable:.
-
#changed? ⇒ Boolean
For rememberable.
-
#email_changed? ⇒ Boolean
For validatable.
-
#email_was ⇒ Object
For confirmable.
-
#encrypted_password_changed? ⇒ Boolean
For recoverable and database_authenticatable.
- #update_attribute(key, value) ⇒ Object
- #update_attributes(hash, *ignored) ⇒ Object
Instance Method Details
#assign_attributes(hash) ⇒ Object
for database_authenticatable:
32 33 34 |
# File 'lib/sequel/plugins/devise.rb', line 32 def assign_attributes(hash) set hash end |
#changed? ⇒ Boolean
For rememberable
15 16 17 |
# File 'lib/sequel/plugins/devise.rb', line 15 def changed? # For rememberable !changed_columns.empty? end |
#email_changed? ⇒ Boolean
For validatable
23 24 25 |
# File 'lib/sequel/plugins/devise.rb', line 23 def email_changed? # For validatable new? || column_changed?(:email) end |
#email_was ⇒ Object
For confirmable
27 28 29 |
# File 'lib/sequel/plugins/devise.rb', line 27 def email_was # For confirmable column_changes[:email].first end |
#encrypted_password_changed? ⇒ Boolean
For recoverable and database_authenticatable
19 20 21 |
# File 'lib/sequel/plugins/devise.rb', line 19 def encrypted_password_changed? # For recoverable and database_authenticatable new? || column_changed?(:encrypted_password) end |
#update_attribute(key, value) ⇒ Object
44 45 46 |
# File 'lib/sequel/plugins/devise.rb', line 44 def update_attribute(key, value) update_attributes key => value end |
#update_attributes(hash, *ignored) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/sequel/plugins/devise.rb', line 36 def update_attributes(hash, *ignored) begin update(hash) != false rescue Sequel::ValidationFailed return false end end |