私はryanb-scope-builderを使用しており、次の問題に直面しています。スコープビルダーのスコープをORできますか?
def self.search(options)
scope_builder do |builder|
builder.released.visible
builder.cheap if options[:cheap]
end
end
これは持っているクエリを生成します。
builder.released.visible *AND* builder.cheap if options[:cheap]
私はこの問題を解決することができる任意の範囲ビルダー宝石があります範囲が
のようにOR演算することにしたいのに対し?? ありがとう
この質問はhttp://stackoverflow.com/questions/30の複製です05488/disjunction-in-activerecord – samuil