Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | `Attribute` should know about its name | Sean Griffin | 2014-06-26 | 1 | -12/+25 |
| | | | | | This allows using polymorphism for the uninitialized attributes raising an exception behavior. | ||||
* | Encapsulate the creation of `Attribute` objects | Sean Griffin | 2014-06-26 | 1 | -0/+26 |
| | | | | | | | | This will make it less painful to add additional properties, which should persist across writes, such as `name`. Conflicts: activerecord/lib/active_record/attribute_set.rb | ||||
* | Introduce an Attribute object to handle the type casting dance | Sean Griffin | 2014-06-13 | 1 | -0/+103 |
There's a lot more that can be moved to these, but this felt like a good place to introduce the object. Plans are: - Remove all knowledge of type casting from the columns, beyond a reference to the cast_type - Move type_cast_for_database to these objects - Potentially make them mutable, introduce a state machine, and have dirty checking handled here as well - Move `attribute`, `decorate_attribute`, and anything else that modifies types to mess with this object, not the columns hash - Introduce a collection object to manage these, reduce allocations, and not require serializing the types |