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

Add support for Rails 5.2 #18

Merged
merged 3 commits into from
Dec 7, 2018
Merged

Add support for Rails 5.2 #18

merged 3 commits into from
Dec 7, 2018

Conversation

afomera
Copy link
Contributor

@afomera afomera commented Oct 20, 2018

Rails refactored their private WhereClause class to only accept one argument. This removes the second argument so that it will work properly.

Rails removed the second argument to the ActiveRecord::WhereClause class

This fixes it to work for Rails 5.2

Change was made in Rails 5.2 in this commit on Rails:

rails/rails@213796f#diff-c9d167bac00ff2f45c5b5e035e8a80e8
@@ -39,7 +39,12 @@ module WhereMethods
end
memo
end
if ActiveRecord::VERSION::STRING > '5'
if ActiveRecord::VERSION::STRING >= '5.2'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reln = if
  ...
  else

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not make this change here

@afomera afomera merged commit f7485fd into master Dec 7, 2018
@afomera afomera deleted the feature/rails-5-2-support branch December 7, 2018 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants