includes : disable static checks when using polymorphic relations#13
Closed
ThomasSevestre wants to merge 3 commits into
Closed
includes : disable static checks when using polymorphic relations#13ThomasSevestre wants to merge 3 commits into
ThomasSevestre wants to merge 3 commits into
Conversation
Collaborator
|
@ThomasSevestre would you be kind to provide a test case to replicate this scenario pretty please? |
Author
|
any feedback ? |
stas
approved these changes
Nov 20, 2019
Collaborator
stas
left a comment
There was a problem hiding this comment.
@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 |
Collaborator
There was a problem hiding this comment.
RSpec syntax allows passing directly a block:
https://relishapp.com/rspec/rspec-expectations/docs/built-in-matchers/raise-error-matcher
8af5e9a to
f0325f9
Compare
Contributor
|
Just an FYI, I saw this as well when building #32 and fixed it there too. Same logic, just |
This was referenced Jan 5, 2020
Collaborator
|
Superseded by #32 |
Collaborator
|
Thanks again @ThomasSevestre |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
when including
whatever.polymorphic_relation.something_else, original code complains aboutsomething_elsenot being compatible withwhatever