validates_presence_of and validates_length_of

Pick one:

validates_presence_of :snausages
validates_length_of :snausages, :maximum => 3

OR

validates_length_of :snausages, :maximum => 3, :allow_nil => true

I broke my app because of not including allow_nil

grep validates_length_of app/models/*.rb | grep -v allow_nil

// engtech 

Text tagged as: rails