-
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
Remove duplicate test helper #1161
Remove duplicate test helper #1161
Conversation
5dcf907
to
26277ea
Compare
Failures are appveyor only and apply to open issue #1130
|
@@ -10,4 +17,13 @@ def with_adapter(adapter) | |||
ensure | |||
ActiveModel::Serializer.config.adapter = old_adapter | |||
end | |||
alias_method :with_configured_adapter, :with_adapter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the with_configured_adapter
. Could you show me a situation where it makes sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the comment at the top of the method answer that question?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before SerializableResource, the only way to specify an adapter was global, as an option to render, or by building the serializer and adapter yourself.. now we don't need global quite as much
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I got it. I was reading that as "do stuff with the adapter I'm providing, that I have given a specific configuration", instead of "do stuff with this adapter by setting it as the configured adapter".
👍 |
Remove duplicate test helper
No description provided.