where(opts, *rest) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Show source
Register or log in to add new notes.
August 22, 2012 - (>= v3.0.0)
0 thanks

Rails Guides

There is an excellent guide on the use of this method located here:

http://guides.rubyonrails.org/active_record_querying.html#conditions

June 26, 2013 - (v3.0.0 - v3.2.13)
0 thanks

IS NOT NULL or !=

where.not()

# SELECT `users`.* FROM `users` WHERE (`users`.`id` != 1) AND (`users`.`name` IS NOT NULL)
 User.where.not(id: 1).where.not(name: nil)
December 3, 2013
0 thanks

usage examples

For detailed usage examples of where see “Conditions” under ActiveRecord::Base.