Skip to content
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

Ignore non-arel nodes in joins_values #206

Merged
merged 1 commit into from
Apr 12, 2018
Merged

Conversation

shioyama
Copy link
Owner

@shioyama shioyama commented Apr 12, 2018

This is a bug with the table backend:

Post.i18n.joins(:translations).where(title: "foo")
#=> NoMethodError: undefined method `left' for :translations:Symbol#=> NoMethodError: undefined method `left' for :translations:Symbol

The joins here is redundant, but the exception is unexpected. We need to filter out non-arel nodes when checking to see if we have already joined translations.

@shioyama shioyama merged commit f99fe62 into master Apr 12, 2018
@shioyama shioyama deleted the query_methods_join_symbol branch April 16, 2018 13:07
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.

1 participant