Ruby on Rails
Tuesday, July 1, 2014
Although, any help regarding validations would be much appreciated. I need the user's entered value for the impact and likelihood fields to be an integer between 0 and 100. What I would usually expect would work, something like:
-- validates_inclusion_of :impact, :in => 0..100
doesn't. Validation always fails, presumably because the input is generated as an array with an integer inside, rather than a traditional integer. Anyone know how I could bypass this issue?
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/832dd500-276d-4ea9-94ae-36df07531c53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment