Skip to content

::default_attributes

Compare
Choose a tag to compare
@hallgren hallgren released this 03 Feb 10:01
· 101 commits to master since this release

Its possible to add a default_attributes method on an aggregate and set default values to new and already created aggregates.

The default_attributes method will be run before initialize on Class.new and before the events when an aggregate is rebuilt. This will make is possible to add default attributes to an aggregate during its hole life cycle.