Skip to content

Use resource_class of relationship to apply filters, etc.#224

Merged
lgebhardt merged 1 commit intoJSONAPI-Resources:masterfrom
togglepro:has_many_association_filters
May 29, 2015
Merged

Use resource_class of relationship to apply filters, etc.#224
lgebhardt merged 1 commit intoJSONAPI-Resources:masterfrom
togglepro:has_many_association_filters

Conversation

@barelyknown
Copy link
Copy Markdown
Collaborator

This one took me a while to track down! 🎉

The source resource class was being used to apply filters, sorting, and pagination for relationships. So, if apply_filters et al were implemented in the resource class for the relationship, they weren't being used. That was causing incorrect results to be returned by the get_related_resources controller method.

lgebhardt added a commit that referenced this pull request May 29, 2015
Use resource_class of relationship to apply filters, etc.
@lgebhardt lgebhardt merged commit 44ecd55 into JSONAPI-Resources:master May 29, 2015
@lgebhardt
Copy link
Copy Markdown
Contributor

Good catch! 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