-
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
Extract IncludeTree. #1685
Extract IncludeTree. #1685
Conversation
1857be6
to
268fb37
Compare
doh, now it needs rebase :-( |
No worries, should be an easy one. Plus, let's wait for the gem renaming. |
Removing 'Needs Team Discussion' because we already discussed what to do with this.
|
85ed912
to
1cae06d
Compare
@@ -33,7 +36,7 @@ def serializable_hash_for_single_resource(options) | |||
|
|||
def resource_relationships(options) |
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.
Unrelated to this PR but this method could be rewritten as follows:
def resource_relationships(options)
serializer.associations(@include_directive)
.each_with_object({}) do |association, hash|
hash[association.key] = relationship_value_for(association, options)
end
end
Rebased and changed the gem's name to |
@@ -42,6 +42,8 @@ Gem::Specification.new do |spec| | |||
# 'minitest' | |||
# 'thread_safe' | |||
|
|||
spec.add_runtime_dependency 'jsonapi' |
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.
💯
LGTM, just two more things before merging:
|
Yay! though I don't think the jsonapi gem should be implementing the |
@bf4 The default behavior of the gem is to ignore |
Awesome response! B mobile phone
|
needs rebase :-( |
a37abe5
to
b75db86
Compare
Rebased and changelog added! |
0e81831
to
73716f8
Compare
Rebased again. We should probably pin the dependency to |
@beauby one last rebase!? |
32facf0
to
f8554e3
Compare
f8554e3
to
6035c9d
Compare
Rebased 👍 |
LGTM! good work @beauby. Your JSON API gem is great! :-) |
Remove IncludeTree; missing from #1685
Purpose
Extract the
IncludeTree
class (new source) into its own gem (jsonapi, in an attempt to share some work with jsonapi-resources (c.f. cerebris/jsonapi-resources#679).Changes
Caveats
Related GitHub issues
Additional helpful information