lib/sequel/plugins/devise.rb in sequel-devise-0.0.6 vs lib/sequel/plugins/devise.rb in sequel-devise-0.0.7
- old
+ new
@@ -11,10 +11,14 @@
module InstanceMethods
def changed? # For rememberable
!changed_columns.empty?
end
+ def encrypted_password_changed? # For recoverable and database_authenticatable
+ new? || column_changed?(:encrypted_password)
+ end
+
def email_changed? # For validatable
new? || column_changed?(:email)
end
def email_was # For confirmable
@@ -26,10 +30,10 @@
set hash
end
def update_attributes(hash, *ignored)
begin
- update hash
+ update(hash) != false
rescue Sequel::ValidationFailed
return false
end
end