lib/mongoid/orderable/generators/scope.rb in mongoid_orderable-6.0.4 vs lib/mongoid/orderable/generators/scope.rb in mongoid_orderable-6.0.5
- old
+ new
@@ -9,10 +9,10 @@
klass.class_eval do
scope "orderable_#{field_name}_scope", criteria
end
end
- protected
+ private
def criteria(order_scope)
case order_scope
when Proc then order_scope
when Array then ->(doc) { where(order_scope.each_with_object({}) {|f, h| h[f] = doc.send(f) }) }