update this for a change in the core method

This commit is contained in:
wycats
2010-08-03 11:49:44 -07:00
parent 9ae7f04cd6
commit 4474470ffd

View File

@@ -133,7 +133,7 @@ module ActiveModel
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