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

Fix Rails 4.2 AREL bug. Bind values manually #4

Merged
merged 2 commits into from
Apr 10, 2015

Conversation

Nedomas
Copy link
Owner

@Nedomas Nedomas commented Apr 10, 2015

Issue #2

AdequateRecord of Rails 4.2 changed the way AREL binds values to the query object.
This is the simplest solution I've come up with.

@remigijusj solution (https://gist.github.com/remigijusj/65ce558215292b85948b) is better as it uses bind_values mechanism, but introduces a strange dynamic of binding values on where query and not on a standalone query object.

@remigijusj, what do you think?

Rspecs pass.

@Nedomas
Copy link
Owner Author

Nedomas commented Apr 10, 2015

Its backwards compatible with Rails 3.0+

Nedomas added a commit that referenced this pull request Apr 10, 2015
Fix Rails 4.2 AREL bug. Bind values manually
@Nedomas Nedomas merged commit 3eb8651 into master Apr 10, 2015
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