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

allow to send fields and/or includes on create/update resource #285

Conversation

senid231
Copy link
Member

@senid231 senid231 commented May 25, 2018

add ability to send includes and/or fields query params on resource create/update

TODO:

  • code
  • tests
  • documentation

example

article = Article.find(1).first
article.request_includes(:comments, author: :comments)
article.request_fields(articles: [:title], authors: [:name, :comments])
article.title = "changed title"
article.save
# PATCH /articles/1?fields[articles]=title&fields[authors]=name,comments&include=comments,author.comments

@senid231 senid231 self-assigned this May 25, 2018
@senid231 senid231 force-pushed the query-params-on-create-and-update-resource branch 4 times, most recently from 0c70c78 to 8dede9e Compare May 25, 2018 15:38
@senid231 senid231 changed the title WIP: allow to send fields and/or includes on create/update resource allow to send fields and/or includes on create/update resource May 25, 2018
@senid231 senid231 merged commit b4e5804 into JsonApiClient:master May 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant