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

To make uniqueness validator work with squeel (Rails 3.0) #437

Merged
merged 1 commit into from Apr 23, 2015

Conversation

torumori
Copy link

Please consider this to be fixed although 3-0-stable might be already out of support, but without this change, it causes ActiveRecord::StatementInvalid exception if the application uses squeel gem and the translated model uses the uniqueness validation.

https://github.com/activerecord-hackery/squeel#symbols-as-the-value-side-of-a-condition-in-normal-where-clauses
"If you have any where() clauses that use a symbol as the value side (right-hand side) of a condition, you will need to change the symbol into a string in order for it to continue to be treated as a value."

https://github.com/activerecord-hackery/squeel#symbols-as-the-value-side-of-a-condition-in-normal-where-clauses
"If you have any where() clauses that use a symbol as the value side (right-hand side) of a condition, you will need to change the symbol into a string in order for it to continue to be treated as a value."
@parndt
Copy link
Member

parndt commented Apr 23, 2015

I don't see a problem with this, except that the tests are failing but this doesn't seem to be your fault.

parndt added a commit that referenced this pull request Apr 23, 2015
To make uniqueness validator work with squeel (Rails 3.0)
@parndt parndt merged commit 6178a41 into globalize:3-0-stable Apr 23, 2015
@parndt
Copy link
Member

parndt commented Apr 23, 2015

@torumori which version are you using? Do you want a new gem release?

@torumori
Copy link
Author

@parndt Thank you for your quick response!
We are using version 3.0.4 globalize for Rails 3 version of our application. If you could provide a new release like 3.0.5 or 3.0.4.1, it would be greatly appreciated.

@parndt
Copy link
Member

parndt commented Apr 23, 2015

@torumori thanks for fixing it!

Version 3.0.5 has been released to https://rubygems.org/gems/globalize/versions/3.0.5

@torumori
Copy link
Author

@parndt thank you much!

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.

None yet

2 participants