aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-05-19 01:29:15 -0400
committerNeeraj Singh <neerajdotname@gmail.com>2010-05-19 01:29:15 -0400
commit1c3d2a5a6035bd2041126a4829b087f76f3586f7 (patch)
tree80d8ac13193b104bce9770e68f402118b778db73 /activesupport
parent695cabce39474dd75af19f6a70bb2104091cdf49 (diff)
downloadrails-1c3d2a5a6035bd2041126a4829b087f76f3586f7.tar.gz
rails-1c3d2a5a6035bd2041126a4829b087f76f3586f7.tar.bz2
rails-1c3d2a5a6035bd2041126a4829b087f76f3586f7.zip
Updating the doc with the info that class_inheritable_accessor
copies properties to child at runtime
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb b/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
index 2b8e2b544f..4f84424e13 100644
--- a/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
+++ b/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
@@ -9,6 +9,8 @@ end
# their parents' attributes, instead of just a pointer to the same. This means that the child can add elements
# to, for example, an array without those additions being shared with either their parent, siblings, or
# children, which is unlike the regular class-level attributes that are shared across the entire hierarchy.
+# Note that subclasses are give a copy of parent attributes at runtime when subclass is created. After the
+# subclass has been created any change in parent attributes will not be reflected in child.
class Class # :nodoc:
def class_inheritable_reader(*syms)
options = syms.extract_options!