diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-08-31 15:47:59 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-08-31 15:47:59 -0300 |
commit | c11eec84821b9f88d928be77a9ed636384f2e699 (patch) | |
tree | ee07d9c8520d8f8eae89ba62862de3035d8a6afe /activerecord/lib/active_record/relation/query_methods.rb | |
parent | 87e50f104a27b6c6d1452839adef7c7350769071 (diff) | |
download | rails-c11eec84821b9f88d928be77a9ed636384f2e699.tar.gz rails-c11eec84821b9f88d928be77a9ed636384f2e699.tar.bz2 rails-c11eec84821b9f88d928be77a9ed636384f2e699.zip |
Avoid calling build_where is no argument is given.
Diffstat (limited to 'activerecord/lib/active_record/relation/query_methods.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 5549358fcd..979f8259cf 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -52,7 +52,7 @@ module ActiveRecord 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 |