Skip to content

Commit

Permalink
Avoid calling build_where is no argument is given.
Browse files Browse the repository at this point in the history
  • Loading branch information
miloops committed Aug 31, 2010
1 parent 87e50f1 commit c11eec8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/relation/query_methods.rb
Expand Up @@ -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
Expand Down

0 comments on commit c11eec8

Please sign in to comment.