The database query that you want is foo.odometer IS NULL (for when it 
has not been set) or IS NOT NULL (for when it has ben set).

You could google ActiveRecord and "IS NULL" and see if you find hits.  I 
*think* the code does this correctly.  e.g.

Table.find(:all, :conditions => { :odomiter => nil })

Try it, look at the log and see if you get the right query.  Last 
resort, you can do the SELECT query yourself.

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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