Rails ActiveRecord conditions
Posted
by xpepermint
on Stack Overflow
See other posts from Stack Overflow
or by xpepermint
Published on 2010-02-25T12:38:10Z
Indexed on
2010/05/12
22:44 UTC
Read the original article
Hit count: 281
Is there a way to create a condition like this?
@products = Product.find(:all,
:limit => 5,
:conditions => { :products => { :locale => 'en', :id NOT '1' }, :tags => { :name => ['a','b']})
I would like to list all products not including product 1. Thx.
© Stack Overflow or respective owner