• R
    Consolidate duplicated code that initializing an empty model object · 1198a388
    Ryuta Kamizono 提交于
    `init_with` and `init_from_db` are almost the same code except decode
    `coder`.
    
    And also, named `init_from_db` is a little misreading, a raw values hash
    from the database is already converted to an attributes object by
    `attributes_builder.build_from_database`, so passed `attributes` in that
    method is just an attributes object.
    
    I renamed that method to `init_with_attributes` since the method is
    shared with `init_with` to initialize an empty model object.
    1198a388
core.rb 20.2 KB