From 4474470ffda3d08c9469fe113e251ff3a9e8bd54 Mon Sep 17 00:00:00 2001 From: wycats Date: Tue, 3 Aug 2010 11:49:44 -0700 Subject: [PATCH] update this for a change in the core method --- activemodel/lib/active_model/validations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb index 32e3cb5b79..14e6ca0e30 100644 --- a/activemodel/lib/active_model/validations.rb +++ b/activemodel/lib/active_model/validations.rb @@ -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