Skip to content

Fix issue where resources received context nested in hash#905

Merged
lgebhardt merged 1 commit intoJSONAPI-Resources:masterfrom
austenito:fix-context-for-cached-resources
Nov 16, 2016
Merged

Fix issue where resources received context nested in hash#905
lgebhardt merged 1 commit intoJSONAPI-Resources:masterfrom
austenito:fix-context-for-cached-resources

Conversation

@austenito
Copy link
Copy Markdown
Contributor

@austenito austenito commented Nov 15, 2016

  • If caching has been enabled, however disabled for a resource, the context values are nested in a a 'context' key. For example:
{ context: { foo: :bar } } 
vs. 
{ foo: :bar }

I wasn't sure how to test, so I ended up adding context to a resource. I'm open to suggestions on how you wanted this case covered.

* If caching has been enabled, however disabled for a resource, the
  context values are nested in a a 'context' key. For example:
  { context: { foo: :bar } } vs { foo: :bar }
@lgebhardt lgebhardt merged commit faf66b6 into JSONAPI-Resources:master Nov 16, 2016
@lgebhardt
Copy link
Copy Markdown
Contributor

@austenito Thanks!

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 this pull request may close these issues.

2 participants