Skip to content

Commit 194e7bf

Browse files
authored
Alias model#new_record? to #new (#4)
1 parent f4e3f9f commit 194e7bf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/sequel/plugins/devise.rb

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ def self.apply(model, options = {})
66
model.plugin :hook_class_methods # Devise requires a before_validation
77
model.plugin :dirty # email_changed?
88
model.plugin :validation_class_methods # for using validatable module
9+
10+
# for Devise::Models::Trackable
11+
model.send :alias_method, :new_record?, :new?
912
end
1013

1114
module InstanceMethods

0 commit comments

Comments
 (0)