Wrapped scope condition in proc.
This commit is contained in:
parent
40ffdbd864
commit
6dbc5a459f
@ -26,7 +26,7 @@ module Mongoid
|
||||
end
|
||||
|
||||
values.each do |value|
|
||||
scope value, where(field_name => value)
|
||||
scope value, ->{ where(field_name => value) }
|
||||
|
||||
if multiple
|
||||
class_eval "def #{value}?() self.#{field_name}.include?(:#{value}) end"
|
||||
|
Loading…
x
Reference in New Issue
Block a user