Hi everyone,

I just need a quick help :)

What is the best way to write some code in :presence option?

I have a Question model and one of the fields is question_type:
 - example question
 - static question

Each question has alternatives, and each of them has scores

What I want is to validate the presence of :score, but when its only
on the static question.
I dont want to validate the presence of the score in examples

validates :score, :presence => {:if => ???? }

What should I do?

Thanks

Javier Q

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to