Skip to content

Allow passing routing options to jsonapi_relationships#260

Merged
lgebhardt merged 1 commit intoJSONAPI-Resources:masterfrom
Garage-mca:feature-relationships-route-options
Jun 18, 2015
Merged

Allow passing routing options to jsonapi_relationships#260
lgebhardt merged 1 commit intoJSONAPI-Resources:masterfrom
Garage-mca:feature-relationships-route-options

Conversation

@biomancer
Copy link
Copy Markdown
Contributor

This allows passing routing options to jsonapi_relationships, which is useful if you are building read-only API, and want to limit generated methods to GET-only:

with_options(only: [:index, :show]) do
    jsonapi_resources :contacts do
      jsonapi_relationships
    end
end

jsonapi_links and jsonapi_related_resources already support these options, so it seemed logical to add it here too.

lgebhardt added a commit that referenced this pull request Jun 18, 2015
…ptions

Allow passing routing options to jsonapi_relationships
@lgebhardt lgebhardt merged commit b0f662b into JSONAPI-Resources:master Jun 18, 2015
@lgebhardt
Copy link
Copy Markdown
Contributor

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