From f1a534af98950efd9969deea1540717c4516d673 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Thu, 1 Dec 2011 17:55:27 +0000 Subject: Remove the need for type_cast_attribute. This is good because it reduces duplication. --- activerecord/lib/active_record/attribute_methods.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/lib/active_record/attribute_methods.rb') diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index 818dc88725..3c9fafb1ca 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -29,6 +29,10 @@ module ActiveRecord end end + def generated_attribute_methods + @generated_attribute_methods ||= (base_class == self ? super : base_class.generated_attribute_methods) + end + def undefine_attribute_methods if base_class == self super -- cgit v1.2.3