Skip to content

Refactor ensure_valid_accept_media_type#781

Merged
lgebhardt merged 1 commit intoJSONAPI-Resources:masterfrom
shunwen:refactor_ensure_valid_accept_media_type
Jul 27, 2016
Merged

Refactor ensure_valid_accept_media_type#781
lgebhardt merged 1 commit intoJSONAPI-Resources:masterfrom
shunwen:refactor_ensure_valid_accept_media_type

Conversation

@shunwen
Copy link
Copy Markdown
Contributor

@shunwen shunwen commented Jul 27, 2016

Replace invalid_accept_media_type? with valid_accept_media_type? method, which I think it's easier to understand which media types are valid. Only allow the following Accept types:

  1. Blank
  2. ALL_MEDIA_TYPES # => '*/*'
  3. JSONAPI::MEDIA_TYPE # => 'application/vnd.api+json'

@lgebhardt lgebhardt merged commit f0533fb into JSONAPI-Resources:master Jul 27, 2016
@lgebhardt
Copy link
Copy Markdown
Contributor

@shunwen 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