You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 16, 2020. It is now read-only.
class TestAgedUser < TestUser
attributes :age
end
it "inherits attributes" do
TestAgedUser.column_names.should == [ "id", "created_at", "updated_at", "name", "age" ]
end
We can't use a class ivar because they don't inherit. A class @@var is shared between every class in the inheritance chain IIRC.
Failing test includes
We can't use a class ivar because they don't inherit. A class @@var is shared between every class in the inheritance chain IIRC.
In Traco, we use ActiveSupport's class_attribute which inherits the way we want.