You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does as_json work? I think to_json is defined by some other gem as basically as_json.to_s.
I use a custom representer to always force Grape's present ... to return JSON like so:
moduleGrapemoduleRoarmoduleRepresenterdefself.included(base)base.extend(ClassMethods)endmoduleClassMethodsdefrepresent(object,options={})object.extendself# our own version of Grape::Roar::Representer# returns a serializable objectobject.to_json(options)endendendendend
I often find myself writing code like:
or..
This gem looks great, but I can't seem to figure out an easy way to send data to the
to_json
method.I would imagine some changes would need to happen here and here
Any ideas - if this is already possible - to how I can get this working?
The text was updated successfully, but these errors were encountered: