class User < Praxis::MediaType
attribute :cf, String
attribute :firstname, String
attribute :gender, String
attribute :id, Integer
view :default do
attribute :cf
attribute :firstname
attribute :gender
attribute :id
end
view :minimal do
attribute :id
attribute :firstname
end
end
It would be great to be able to define something like this:
class Activity < Praxis::MediaType
...
attribute :operators, Praxis::Collection.of(User), view: :minimal
end
That is, to exploit the power to the view filters to reduce / customize the output of embedding resources.
Is it possible (or there is at least another way to achieve the same goal)?
Thank you!
--
You received this message because you are subscribed to the Google Groups "praxis-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to praxis-suppor...@googlegroups.com.
To post to this group, send email to praxis-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/praxis-support/63ce502b-c2df-4c9d-a40c-4217be9a4aad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.