Open kmcphillips opened 7 years ago
In combination with http://api.rubyonrails.org/classes/ActiveRecord/Aggregations/ClassMethods.html#method-i-composed_of I think we could greatly simplify things here. I'd be fine having an include
-able module for ActiveModel
, until it also supports the attribute API.
This API has been public since rails 5.0: http://api.rubyonrails.org/classes/ActiveRecord/Attributes/ClassMethods.html#method-i-attribute
Up sides: It would greatly simplify the implementation. It would work with
ActiveModel
objects.Down sides: It's not implemented in
ActiveModel
yet.cc @thegedge