I have some code rendering json as follows...
serialized = ActiveModel::ArraySerializer.new(actions, each_serializer: Api::V1::ActionSerializer)
render json: { actions: serialized }
What I need... is to turn serialized into a string so I can store it in a database record. serialized.to_s
does not work.
How can I turn this #<ActiveModel::ArraySerializer:0x007fdfddc332b8>
into a string representation of the JSON?