diff --git a/lib/hawk/model/proxy.rb b/lib/hawk/model/proxy.rb index a22e170..956f8cd 100644 --- a/lib/hawk/model/proxy.rb +++ b/lib/hawk/model/proxy.rb @@ -98,7 +98,7 @@ def method_missing(meth, *args, &block) # If the method accepts a variable number of parameters, and # the last provided one is an hash, merge the scoped params. - elsif method.arity < 0 && (method.arity + args.size == 0) && args.last.is_a?(Hash) + elsif method.arity < 0 && (method.arity + args.size) == 0 && args.last.is_a?(Hash) args[-1] = params.deep_merge(args[-1]) end