lib/sequel/plugins/devise.rb in sequel-devise-0.0.2 vs lib/sequel/plugins/devise.rb in sequel-devise-0.0.3
- old
+ new
@@ -2,9 +2,17 @@
module Plugins
module Devise
def self.apply(model, options = {})
model.extend ::Devise::Models
model.plugin :hook_class_methods # Devise requires a before_validation
+ model.plugin :dirty # email_changed?
+ model.plugin :validation_class_methods # for using validatable module
+ end
+
+ module InstanceMethods
+ def changed? # For rememberable
+ !changed_columns.empty?
+ end
end
end
end
end