Now that Active Model 5+ is required, we can pull in the attributes behavior from ActiveModel::Model. This adds translation support, and now raises exceptions when assigning unknown attributes.
To accommodate the fact that not all fields from RPC responses are defined as attributes, create/update methods have been updated to use instantiate instead of assign_attributes since it safely works around the unknown attributes error by only capturing known attributes.
Now that Active Model 5+ is required, we can pull in the attributes behavior from
ActiveModel::Model
. This adds translation support, and now raises exceptions when assigning unknown attributes.To accommodate the fact that not all fields from RPC responses are defined as attributes, create/update methods have been updated to use instantiate instead of assign_attributes since it safely works around the unknown attributes error by only capturing known attributes.