On Jun 25, 2013, at 7:36 AM, James Pinto wrote:

> I understand where you're coming from,
> and I completely disagree
> 
> false is blank, but it's not nil,
> however, in some cases, falseness should not be validated
> 
> "validates_presence_of :aggrees_with_contract" is correct, requires the user 
> to check the contract
> "validates_presence_of :displays_photo_for_guests" is incorrect, because it's 
> only a question and it's ok if the user forgets or chooses not to mark

If it's OK if the user doesn't send this value, *why* are you validating for it 
to be present? Set a default for your boolean column (which you should be doing 
anyways :) ) and have a nice life.

--Matt Jones


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to