Is there a way to create a condition like this?
@products = Product.find(:all,
:limit => 5,
:conditions => { :products => { :locale => \'en\'
Rails 3.2.9
@products = Product.english_but_not(1).with_tags('a','b').limit(5)
class Product < ActiveRecord::Base
attr_accessible :locale
has_many :tags
scope :english, -> { where(:locale => 'en') }
scope :except_id, ->(id) { where(arel_table[:id].not_eq(id)) }
scope :english_but_not, ->(id) { english.except_id(id) }
scope :with_tags, ->(*names) { includes(:tags).where(:tags => {:name => names}) }
end