Oops, I would like to render a json using the json_api ( link ) pattern using Rails Serializer ( link ).
In my controler I'm rendering something similar to this:
render json: {'user': {name: 'Peter' }}
However, when I render this JSON, it is not output in json_api format.
In other Controllers / Models serializers are working properly, since they are using ActiveRecord, however in that case I can not pass an ActiveRecord and would like to keep the outputs of my standardized api.
** Note: I can not pass ActiveRecord on this controler because it does not have a table.
Can you help me?