ruby on rails - validates_one_of -


I have a table with a column for boolean values. I want to be the only line that can be a boolean value. Does the train support this kind of facility?

I'm looking for something like the following:

  table id | Bull_value1 | Wrong 2 False 3 True 4 Incorrect  

You can do this, which will validate the speciality only if is enabled to true < / Code> and ignored other cases ( zero and false ), because zero == incorrect : < / P>

  assumption_nation_off: enabled,: if = & gt; 


Comments