我正在使用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]
而我想的范围要像进行或运算
有没有能够解决这个问题的任何范围建设者宝石? 谢谢
此问题是http://stackoverflow.com/questions/30的重复05488 /主动记录分离 – samuil