aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/support
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-12 16:14:20 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-12 16:14:20 +0000
commit8e1f1ee44241838c2b701ad2622d98c9c41ea268 (patch)
tree2e9613082d40152c0303f5b95bdd238cd7a1b36f /activerecord/lib/active_record/support
parentb141bdbb32cb58e493e6f52e4f1baa2a9d28680d (diff)
downloadrails-8e1f1ee44241838c2b701ad2622d98c9c41ea268.tar.gz
rails-8e1f1ee44241838c2b701ad2622d98c9c41ea268.tar.bz2
rails-8e1f1ee44241838c2b701ad2622d98c9c41ea268.zip
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
Diffstat (limited to 'activerecord/lib/active_record/support')
-rw-r--r--activerecord/lib/active_record/support/class_inheritable_attributes.rb7
1 files changed, 5 insertions, 2 deletions
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