lib/admino/query/builder.rb in admino-0.0.18 vs lib/admino/query/builder.rb in admino-0.0.19
- old
+ new
@@ -10,11 +10,12 @@
end
private
def method_missing(method, *args)
- if context.respond_to?(method)
- Builder.new(context, context.send(method, scope, *args))
+ context_method = "#{method}_scope"
+ if context.respond_to?(context_method)
+ Builder.new(context, context.send(context_method, scope, *args))
else
Builder.new(context, scope.send(method, *args))
end
end
end