Wednesday, July 13, 2011

[Rails] Re: help on validation

Thank you Leoncio. I am going to do the validates_each inside the model.
But how can i pass the string as a parameter? basically this what i want
to do

validates_each :field.value, if field.value.eql?(bla bla bla) :message
=> "Please write smth that makes sense."

How can i do that?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate