-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fixed validation failing when using allow_nil => true options #109
base: master
Are you sure you want to change the base?
Conversation
Fixed minor grammetical errors on specs
@sankaranarayanan Can you share some example model code, how it behaves, and how you expect it to behave? |
If you set to a empty string, it should return nil not 0. it should not type cast to to_i. That's why its failing in validations check the example In ActiveRecord |
Which validations? Please share some example model code. |
class User validates :age, :numericality => {:greater_than_or_equal_to => 0, :less_than_or_equal_to => 100}, :allow_nil => true user = User.new(:age => '') |
Thank you for the details, @sankaranarayanan. |
@cgriego is there any plan to merge this? |
+1 |
1 similar comment
+1 |
@cgriego Will this ever get merged? As it stands, this issue is preventing me from being able to use this gem. |
+1 |
1 similar comment
+1 |
No description provided.