aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb8
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