From 2ffa50f5a9fac08e08869687006031b70322497a Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Fri, 20 Aug 2010 10:17:29 -0400 Subject: after_validation should be called irrespective of the result of validation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I confirmed that this is the behavior on 2.3.x . [5419 state:resolved] Signed-off-by: José Valim --- activemodel/lib/active_model/validations/callbacks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel/lib/active_model/validations') diff --git a/activemodel/lib/active_model/validations/callbacks.rb b/activemodel/lib/active_model/validations/callbacks.rb index afd65d3dd5..858cfda73e 100644 --- a/activemodel/lib/active_model/validations/callbacks.rb +++ b/activemodel/lib/active_model/validations/callbacks.rb @@ -40,7 +40,7 @@ module ActiveModel options = args.extract_options! options[:prepend] = true options[:if] = Array.wrap(options[:if]) - options[:if] << "!halted && value != false" + options[:if] << "!halted" options[:if] << "self.validation_context == :#{options[:on]}" if options[:on] set_callback(:validation, :after, *(args << options), &block) end -- cgit v1.2.3