I have the following conditional validation in my model:
:if => :is_ext?
ext is a boolean value in the database. If it is true the ext_name need
to be supplied. Now it appears that the validation is in fact working
however I wrote two unit test to make sure:
restaurant = Restaurant.new(:ext => 0)
restaurant = Restaurant.new(:ext => 1)
For some reason the second test also fails. Effectively(if i were to
believe th e test) setting the ext field to true does not in fact
require the presence of ext_name. Can some one please help me understand
what is going wrong here?
Thanks a lot,