The Roar gem uses Representable underneath (https://github.com/apotonick/representable#conditions). You can do the following things to have conditional functionality:
respond_with @accounts, represent_with: AccountsRepresenter, exclude: [:assets]
Then
module AccountRepresenter
include Roar::Representer::JSON
include Roar::Representer::Feature::Hypermedia
property :id
property :name
collection :assets, extend: AssetRepresenter, if: lambda { |opts| !opts[:exclude].includes?(:assets)] }
end