Browse files

Remove 'needless boolean casting'.

"Predicates in Rails rely on standard Ruby semantics for boolean values
and guarantee no singletons whatsoever." - @fxn
  • Loading branch information...
1 parent 8954ee6 commit ef64c6ba8c06f89995b4328d3468df9914e3c6b6 @chendo chendo committed Mar 26, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/relation/finder_methods.rb
View
2 activerecord/lib/active_record/relation/finder_methods.rb
@@ -200,7 +200,7 @@ def exists?(id = false)
relation = relation.where(table[primary_key].eq(id)) if id
end
- connection.select_value(relation, "#{name} Exists", relation.bind_values) ? true : false
+ connection.select_value(relation, "#{name} Exists", relation.bind_values)
end
protected

0 comments on commit ef64c6b

Please sign in to comment.