From ce48b3103acd2f58931aa42b93073592b291114e Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 28 Apr 2010 16:24:47 -0300 Subject: Makes validates_acceptance_of to not override database fields [#4460 state:committed] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- activemodel/lib/active_model/validations.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activemodel/lib/active_model/validations.rb') diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb index 708557f4ae..c69cabc888 100644 --- a/activemodel/lib/active_model/validations.rb +++ b/activemodel/lib/active_model/validations.rb @@ -133,6 +133,9 @@ module ActiveModel _validators[attribute.to_sym] end + def attribute_method?(attribute) + method_defined?(attribute) + end private def _merge_attributes(attr_names) -- cgit v1.2.3