Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have attributes_builder handle MIQ virtual_attributes
This overwrites the default method for this by adding an additional check to the proc that is defined with the AttributeSet::Builder to check to see if the key should be provided a default from the `_default_attributes` hash to not only check to see if it is a column from the database, but also a virtual_attribute. The functionality added by: rails/rails@3e37a8b#diff-6c8fd220c92c2b25aa29891b59d00c04 was meant to help vanilla Rails' "virtual attributes" by assigning a default value on model instantiation. This is not what used to be done for any attributes (database or otherwise) besides the primary key for that model. What this does is includes `virtual_attributes` as attributes that aren't defined with a default value, along the database column attributes.
- Loading branch information