我正在使用ryanb-scope-builder,我面临着以下问题。
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运算
builder.released.visible *OR* builder.cheap if options[:cheap]有没有scope builder gem可以解决这个问题??谢谢
发布于 2011-08-01 15:50:20
https://stackoverflow.com/questions/6894596
复制相似问题