Skip to content
This repository
Browse code

Merge pull request #5582 from chendo/master

Remove "needless boolean casting"
  • Loading branch information...
commit ded74dfd8b68153a2eec2a6c2bcee3c6e43bb91b 2 parents bca7770 + ef64c6b
Xavier Noria fxn authored
2  activerecord/lib/active_record/relation/finder_methods.rb
@@ -200,7 +200,7 @@ def exists?(id = false)
200 200 relation = relation.where(table[primary_key].eq(id)) if id
201 201 end
202 202
203   - connection.select_value(relation, "#{name} Exists", relation.bind_values) ? true : false
  203 + connection.select_value(relation, "#{name} Exists", relation.bind_values)
204 204 end
205 205
206 206 protected

0 comments on commit ded74df

Please sign in to comment.
Something went wrong with that request. Please try again.