Permalink
Browse files

update this for a change in the core method

  • Loading branch information...
1 parent 9ae7f04 commit 4474470ffda3d08c9469fe113e251ff3a9e8bd54 @wycats wycats committed Aug 3, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activemodel/lib/active_model/validations.rb
@@ -133,7 +133,7 @@ def validate(*args, &block)
def validate_on_#{type}(*args, &block)
msg = "validate_on_#{type} is deprecated. Please use validate(args, :on => :#{type})"
ActiveSupport::Deprecation.warn(msg, caller)
- options = args.last || {}
+ options = args.extract_options!
options[:on] = :#{type}
validate(args.push(options), &block)
end

0 comments on commit 4474470

Please sign in to comment.