Permalink
Browse files

removing unnecessary conditional test

  • Loading branch information...
1 parent 16cff17 commit ad781a175c1f0ee0656d2cbcfc534be6936418c3 @tenderlove tenderlove committed Sep 8, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 activerecord/lib/active_record/relation/query_methods.rb
@@ -74,8 +74,8 @@ def joins(*args)
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 @@ def where(opts, *rest)
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

0 comments on commit ad781a1

Please sign in to comment.