For example, I have a representer looking like:
module AccountRepresenter
include Roar::Representer::JSON
include Roar::Representer::Feature::Hypermedia
property :id
property :name
collection :assets, :extend => AssetRepresenter, :class => Asset
end
In controller I use it as:
respond_with @accounts, represent_with: AccountsRepresenter
For another action I don't want collection :assets
to be presented. I tried
respond_with @accounts, represent_with: AccountsRepresenter, exclude: :assets
But it doesn't work. How should I pass argument into representers?