Yeah.  I guess ruby is making me lazy.  ;-)

I'll set all my NULLs to false and validate presence.

On Jan 3, 5:42 pm, Scott Ribe <[email protected]> wrote:
> On Jan 3, 2011, at 3:08 PM, Tony Primerano wrote:
>
> > Post.where('draft is NOT true')
>
> That shouldn't work either. NULL is neither true nor false. "draft = false or 
> draft is null" is the SQL for what you're asking for.
>
> But if NULL really has no meaning that is distinct from false, then it's an 
> incorrect design to allow it in the first place.
>
> --
> Scott Ribe
> [email protected]http://www.elevated-dev.com/
> (303) 722-0567 voice

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to