Ok,
Thank you. I read Rails Guide on ActiveRecord Validations and
Callbacks, specifically Conditional Validation.
So,
validates :question, :presence => true, :if => "question_type.blank?"
placed inline in model should be the simplest way to do this. It does
not work however. My lack of understanding seems to be related to how I
specify question_type in the condition?
As you can see i'm still on the bottom of the steep part of the learning
curve.'
Thanks for the help
--
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 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.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment