aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/attribute_set_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* AttributeSet#include? -> AttributeSet#key?Sean Griffin2014-07-111-5/+5
| | | | https://github.com/rails/rails/pull/15868/files#r14135210
* `Attribute` should know about its nameSean Griffin2014-06-261-0/+3
| | | | | This allows using polymorphism for the uninitialized attributes raising an exception behavior.
* Encapsulate the creation of `Attribute` objectsSean Griffin2014-06-261-1/+35
| | | | | | | | 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
* Merge pull request #15868 from sgrif/sg-uninitialized-attributesRafael Mendonça França2014-06-261-0/+56
|\ | | | | | | | | | | | | | | Move behavior of `read_attribute` to `AttributeSet` Conflicts: activerecord/lib/active_record/attribute_set.rb activerecord/test/cases/attribute_set_test.rb
| * Move behavior of `read_attribute` to `AttributeSet`Sean Griffin2014-06-251-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved `Builder` to its own file, as it started looking very weird once I added private methods to the `AttributeSet` class and the `Builder` class started to grow. Would like to refactor `fetch_value` to change to ```ruby self[name].value(&block) ``` But that requires the attributes to know about their name, which they currently do not.
* | Merge pull request #15846 from sgrif/sg-attributes-before-type-castRafael Mendonça França2014-06-261-0/+7
|\ \ | |/ |/| | | | | | | | | | | Move `attributes_before_type_cast` to `AttributeSet` Conflicts: activerecord/lib/active_record/attribute_set.rb activerecord/test/cases/attribute_set_test.rb
| * Move `attributes_before_type_cast` to `AttributeSet`Sean Griffin2014-06-211-0/+7
| |
* | Merge pull request #15839 from sgrif/sg-attr-set-nullYves Senn2014-06-221-0/+8
|\ \ | | | | | | Return a null object from `AttributeSet#[]`
| * | Return a null object from `AttributeSet#[]`Sean Griffin2014-06-201-0/+8
| |/
* / Move `attributes` to the `AttributeSet` object.Sean Griffin2014-06-211-0/+8
|/
* Introduce an object to aid in creation and management of `@attributes`Sean Griffin2014-06-191-0/+49
Mostly delegation to start, but we can start moving a lot of behavior in bulk to this object.