diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-08 16:38:54 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-08 16:38:54 -0700 |
commit | 588db0fa8f0e7858a95408b0be1fc658c114f7b9 (patch) | |
tree | 54a58100603da5fa280ea3b6af92921c92b3fe7e | |
parent | 0db345a39d6890c1869123d9fe3bff5c9b5eef5f (diff) | |
download | rails-588db0fa8f0e7858a95408b0be1fc658c114f7b9.tar.gz rails-588db0fa8f0e7858a95408b0be1fc658c114f7b9.tar.bz2 rails-588db0fa8f0e7858a95408b0be1fc658c114f7b9.zip |
removing unnecessary conditional test
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 7cd391dc1d..c89dd0aec7 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -74,8 +74,8 @@ module ActiveRecord def where(opts, *rest) relation = clone - if opts.present? && value = build_where(opts, rest) - relation.where_values += Array.wrap(value) + if opts.present? + relation.where_values += Array.wrap(build_where(opts, rest)) end relation @@ -84,8 +84,8 @@ module ActiveRecord def having(*args) relation = clone - if args.present? && value = build_where(*args) - relation.having_values += Array.wrap(value) + if args.present? + relation.having_values += Array.wrap(build_where(*args)) end relation |