In my application, :foos have many :bars, and I\'m serializing each foo as JSON like so:
:foos
:bars
@foo.as_json( except: [:created_at, :upd
you use as_json with conditions for customize json response for some actions, but model serializers for default json response that you needed for the most responses.
Read these Model_Serializer VS. as_json, record-serializers-from-scratch.