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
I am using cells (concept cells)
So I kind of expect support for similar syntax in representable
But this is what I need for rendering a controller loaded neighbourhoods (with a city):
classMyRepresenter < Roar::DecoratorincludeRoar::JSONincludeRoar::SomeMagicModule# :Pself.representation_wrap=:citycollection:neighbourhoodsdoproperty:nameendprivatedefneighbourhoodsargs[:neighbourhoods]# Still not the best form but still better than setting a lambda in optionendendMyRepresenter.new(city,neighbourhoods: my_custom_neighbourhoods)
I understand the class might also used for parsing input
But is there anyway to NOT use option to get custom input?
Or I should use a custom class (e.g. Struct) for carrying the data into the representer?
The text was updated successfully, but these errors were encountered:
I recommend using a domain object (e.g. OpenStruct) that reflects your concern and pass that into the representer.
I keep repeating myself, but forms, cells, and representers are no data-mappers, they use data objects to (re-)present them, and even though they provide some tools for mapping this should happen on the outside.
In the coming months I will push the idea of twins and ROM since domain/data modelling must be a first-class citizen of software engineering.
I am using cells (concept cells)
So I kind of expect support for similar syntax in representable
But this is what I need for rendering a controller loaded neighbourhoods (with a city):
I kind of expect
I understand the class might also used for parsing input
But is there anyway to NOT use option to get custom input?
Or I should use a custom class (e.g.
Struct
) for carrying the data into the representer?The text was updated successfully, but these errors were encountered: