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 <scott_r...@killerbytes.com> 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
> scott_r...@elevated-dev.comhttp://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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment