From 8e1f1ee44241838c2b701ad2622d98c9c41ea268 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 12 Dec 2004 16:14:20 +0000 Subject: Moved require_association to associations.rb and added methods for resetting the inheritable attributes on subclasses git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@125 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/active_record/support/class_inheritable_attributes.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/support') diff --git a/activerecord/lib/active_record/support/class_inheritable_attributes.rb b/activerecord/lib/active_record/support/class_inheritable_attributes.rb index ee69646da0..201932cf2d 100644 --- a/activerecord/lib/active_record/support/class_inheritable_attributes.rb +++ b/activerecord/lib/active_record/support/class_inheritable_attributes.rb @@ -28,10 +28,13 @@ module ClassInheritableAttributes # :nodoc: inheritable_attributes[key] end + def reset_inheritable_attributes + inheritable_attributes.clear + end + private def inherited(child) @@classes[child] = inheritable_attributes.dup - end - + end end end -- cgit v1.2.3