【发布时间】:2011-08-01 05:46:00
【问题描述】:
我正在使用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'ed
builder.released.visible *OR* builder.cheap if options[:cheap]
是否有任何范围构建器 gem 可以解决这个问题? 谢谢
【问题讨论】:
标签: ruby-on-rails ruby rubygems named-scope