Skip to main content

Module relation_has_many_via

Module relation_has_many_via 

Source
Expand description

Multi-step (via) has_many relations: a has_many reached by following a path of existing relations rather than a single foreign key.

The shape under test is UserCommentArticle: a user has many comments, each comment belongs to an article, so a user has many commented_articles via comments.article.

Modules§

query_returns_distinct_targets
query_with_no_intermediates_is_empty
via_relation_query_can_be_filtered