From: Ken Ghosh Date: 2010-09-29T18:25:57+09:00 Subject: ActiveRecord Mixing Conditions + Better Way to Write This Is There A better Way to Write this I have A Condition which previous Look Very clean and easy to understand like Account.first.websites.last.users.find(:all,:conditions => {:country => "XYZ",:status => "Single",:admin => nil) Now the big problem is that user with admin = false is not picked up i.e i want all the users from a specific country,having status as "Single" and admin is either "nil"(Null in database) or "false" I manage to get desired code but doesn't seem to be happy with clarity of it Account.first.websites.last.users.find(:all,:conditions => ["country = ? AND status = ? AND admin IS NULL OR admin = ?","XYZ","Single","false"]) Any Help would be appreciated thanks -- Posted via http://www.ruby-forum.com/.