-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easiest way to serialized outside of a controller? #947
Comments
that's close enough.. see how I wrote some tests here #878 (comment) (but why are you serializing outside of the controller). the tl;dr of how AMS does it is https://github.com/rails-api/active_model_serializers/blob/master/lib/action_controller/serialization.rb#L38-L48 |
I'm trying to send a json object to a webhook, using the same serializer that I return as an API response. Hope that makes sense, and thanks for the responses! |
Manual serializing is also useful if you're using the |
Currently, it seems like the best way to serialize outside a controller with the JSON adapter is
Is this is the most direct way to do it? Or perhaps any recommendations?
The text was updated successfully, but these errors were encountered: