Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Avoid calling build_where is no argument is given.

  • Loading branch information...
commit 54b193fe167bbcac02d795c6562ba4e7965726ac 1 parent 5fc006a
@miloops miloops authored spastorino committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/relation/query_methods.rb
View
2  activerecord/lib/active_record/relation/query_methods.rb
@@ -52,7 +52,7 @@ def joins(*args)
end
def where(opts, *rest)
- if value = build_where(opts, rest)
+ if opts.present? && value = build_where(opts, rest)
copy = clone
copy.where_values += Array.wrap(value)
copy
Please sign in to comment.
Something went wrong with that request. Please try again.