• J
    Always generate attribute methods on the base class. · eecfa84a
    Jon Leighton 提交于
    This fixes a situation I encountered where a subclass would cache the
    name of a generated attribute method in @_defined_class_methods. Then,
    when the superclass has it's attribute methods undefined, the subclass
    would always have to dispatch through method_missing, because the
    presence of the attribute in @_defined_class_methods would mean that it
    is never generated again, even if undefine_attribute_methods is called
    on the subclass.
    
    There various other confusing edge cases like this. STI classes share
    columns, so let's just keep all the attribute method generation state
    isolated to the base class.
    eecfa84a
attribute_methods_test.rb 23.2 KB