Handle composite primary keys in scopes#537
Handle composite primary keys in scopes#537causztic wants to merge 10 commits intoCasecommons:masterfrom
Conversation
|
A good place to start would be to set up something in the The test should set up a model / DB table using If we have this level of testing, then I think that the more specific "unit"-level specs are more optional and only really needed if there is some complex or surprising behavior in one of the specific implementation classes. |
|
You can also run Good luck, and thanks for this contribution. |
| include PgSearch::Model | ||
| belongs_to :parent, foreign_key: [:parent_first_name, :parent_last_name] | ||
|
|
||
| pg_search_scope :search_parent_hobby, associated_against: { |
There was a problem hiding this comment.
It's great that you are testing associated_against, good catch!
|
@nertzy checking in ICYMI! |
|
I run into an issue with associations and ended up making this monkey patch. Maybe you find it useful |
|
@mszyndel probably needs an active maintainer to review this for this to go in 😅 |
Fixes #531