You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These Data objects are similar to Structs but they are immutable. This property sounds interesting for the DTOs that this gem generates. There might be some challenges though, like how to keep these DTOs be ActiveModel compliant, or having methods like ==.
One option could be that if you set active_model_compliace to false then you get a Data object, otherwise you get what you get today. If this feels too strict, Data.define classes can be extended in theory, so they might be able to provide enough ActiveModel stuff to make Rails happy.
The text was updated successfully, but these errors were encountered:
These
Data
objects are similar toStruct
s but they are immutable. This property sounds interesting for the DTOs that this gem generates. There might be some challenges though, like how to keep these DTOs be ActiveModel compliant, or having methods like==
.One option could be that if you set
active_model_compliace
tofalse
then you get aData
object, otherwise you get what you get today. If this feels too strict,Data.define
classes can be extended in theory, so they might be able to provide enough ActiveModel stuff to make Rails happy.The text was updated successfully, but these errors were encountered: