Ruby on Rails Monday, January 3, 2011

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_ribe@elevated-dev.com
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 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