aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/attribute
Commit message (Collapse)AuthorAgeFilesLines
* Allow attributes with a proc default to be marshalledSean Griffin2018-01-231-0/+22
| | | | | | | | | | | | | | We don't implement much custom marshalling logic for these objects, but the proc default case needs to be handled separately. Unfortunately there's no way to just say "do what you would have done but with this value for one ivar", so we have to manually implement `marshal_load` as well. The test case is a little bit funky, but I'd really like an equality test in there, and there's no easy way to add one now that this is out of AR (since the `attributes` method isn't here) Fixes #31216
* Move Attribute and AttributeSet to ActiveModelLisa Ugray2017-11-091-0/+30
Use these to back the attributes API. Stop automatically including ActiveModel::Dirty in ActiveModel::Attributes, and make it optional.