Skip to content
This repository
Browse code

Updating the doc with the info that class_inheritable_accessor

copies properties to child at runtime
  • Loading branch information...
commit 1c3d2a5a6035bd2041126a4829b087f76f3586f7 1 parent 695cabc
Neeraj Singh authored May 19, 2010
2  activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb
@@ -9,6 +9,8 @@ module ClassInheritableAttributes # :nodoc:
9 9
 # their parents' attributes, instead of just a pointer to the same. This means that the child can add elements
10 10
 # to, for example, an array without those additions being shared with either their parent, siblings, or
11 11
 # children, which is unlike the regular class-level attributes that are shared across the entire hierarchy.
  12
+# Note that subclasses are give a copy of parent attributes at runtime when subclass is created. After the
  13
+# subclass has been created any change in parent attributes will not be reflected in child. 
12 14
 class Class # :nodoc:
13 15
   def class_inheritable_reader(*syms)
14 16
     options = syms.extract_options!

0 notes on commit 1c3d2a5

Please sign in to comment.
Something went wrong with that request. Please try again.