-
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
Add support for toplevel JSON API links. #1247
Conversation
@@ -1,7 +1,7 @@ | |||
require 'set' | |||
module ActiveModel | |||
class SerializableResource | |||
ADAPTER_OPTION_KEYS = Set.new([:include, :fields, :adapter, :meta, :meta_key]) | |||
ADAPTER_OPTION_KEYS = Set.new([:include, :fields, :adapter, :meta, :meta_key, :links]) |
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.
nice! shouldn't this integrate with existing code such as pagination links?
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.
Not really, pagination is automagically added anyways. I'm up for any suggestion though.
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.
but would both work well together? What do you think about adding a test covering it? 😄
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.
Yes, the pagination stuff just updates the links.
👍 |
Just one small comments, would be nice to have this test IMO. Other then this it LGTM |
LGTM then, merging it. |
Add support for toplevel JSON API links.
update according rubocop rules
update according rubocop rules
As an adapter option: