3 require 'active_support/core_ext/class/inheritable_attributes'
6 include ClassInheritableAttributes
10 write_inheritable_array
"first", [ :one, :two ]
14 write_inheritable_array
"first", [ :three ]
18 write_inheritable_array
"first", [ :four ]
22 class ClassInheritableAttributesTest
< ActiveRecord
::TestCase
24 assert_equal
[ :one, :two ], B
.read_inheritable_attribute("first")
25 assert_equal
[ :three ], C
.read_inheritable_attribute("first")
29 assert_equal
[ :one, :two, :four ], D
.read_inheritable_attribute("first")
30 assert_equal
[ :one, :two ], B
.read_inheritable_attribute("first")