aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-12-01 17:55:27 +0000
committerJon Leighton <j@jonathanleighton.com>2011-12-01 23:41:51 +0000
commitf1a534af98950efd9969deea1540717c4516d673 (patch)
treeee42e61af1e39c9f9f9fab02cce06c83753965ff /activerecord/lib/active_record/attribute_methods.rb
parent47b97a739d5588cfa439a4805fb1ddd3b7a7acbe (diff)
downloadrails-f1a534af98950efd9969deea1540717c4516d673.tar.gz
rails-f1a534af98950efd9969deea1540717c4516d673.tar.bz2
rails-f1a534af98950efd9969deea1540717c4516d673.zip
Remove the need for type_cast_attribute.
This is good because it reduces duplication.
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods.rb')
-rw-r--r--activerecord/lib/active_record/attribute_methods.rb4
1 files changed, 4 insertions, 0 deletions
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