Skip to content
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

AM::S trying to use non-ActiveModel::Serializer seriaizers #1293

Closed
trek opened this issue Oct 23, 2015 · 2 comments
Closed

AM::S trying to use non-ActiveModel::Serializer seriaizers #1293

trek opened this issue Oct 23, 2015 · 2 comments

Comments

@trek
Copy link
Contributor

trek commented Oct 23, 2015

I have a project is migrating to AMS over time. They have classes that AMS is finding but aren't AMS classes so don't adhere to the AMS interface. It'd be great if AMS skipped these or provided a interface for non-AMS classes to say "please don't use me" when serializer_for is called.

@trek
Copy link
Contributor Author

trek commented Oct 23, 2015

Happy to a PR if someone chimes in with whether this should be a fix in serializer_for or an option passed to render like render :json ... serializer: false

@beauby
Copy link
Contributor

beauby commented Oct 26, 2015

As @bf4 stated somewhere, there is already an option to disable AMS on a render call, namely render json: post, adapter: false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants