• J
    association methods are now generated in modules · 7cba6a37
    Josh Susser 提交于
    Instead of generating association methods directly in the model
    class, they are generated in an anonymous module which
    is then included in the model class. There is one such module
    for each association. The only subtlety is that the
    generated_attributes_methods module (from ActiveModel) must
    be forced to be included before association methods are created
    so that attribute methods will not shadow association methods.
    7cba6a37
has_one.rb 1.8 KB