-
Notifications
You must be signed in to change notification settings - Fork 148
includes : disable static checks when using polymorphic relations #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
includes : disable static checks when using polymorphic relations #13
Conversation
|
@ThomasSevestre would you be kind to provide a test case to replicate this scenario pretty please? |
|
any feedback ? |
mocerinoj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.. having the same issue
stas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ThomasSevestre apologies for the late reply. Could you rebase this PR so we can merge it.
Thank you!
| list = List.new | ||
| list.id = 1 | ||
| list.items = [checklist_item, car] | ||
| expect(-> {ListSerializer.new(list, include: ["items.list"])}).not_to raise_error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSpec syntax allows passing directly a block:
https://relishapp.com/rspec/rspec-expectations/docs/built-in-matchers/raise-error-matcher
8af5e9a to
f0325f9
Compare
|
Just an FYI, I saw this as well when building #32 and fixed it there too. Same logic, just |
|
Superseded by #32 |
|
Thanks again @ThomasSevestre |
when including
whatever.polymorphic_relation.something_else, original code complains aboutsomething_elsenot being compatible withwhatever