diff options
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/validations.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb index 72898726d1..edeb508a08 100644 --- a/activemodel/lib/active_model/validations.rb +++ b/activemodel/lib/active_model/validations.rb @@ -9,7 +9,7 @@ module ActiveModel include ActiveSupport::NewCallbacks included do - define_callbacks :validate + define_callbacks :validate, :scope => :name end module ClassMethods @@ -79,7 +79,7 @@ module ActiveModel options[:if] = Array(options[:if]) options[:if] << "@_on_validate == :#{options[:on]}" end - set_callback(:validate, :before, *args, &block) + set_callback(:validate, *args, &block) end end |