aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Chen (chendo) <me@chen.do>2012-03-26 15:55:16 +1100
committerJack Chen (chendo) <me@chen.do>2012-03-26 15:55:16 +1100
commitef64c6ba8c06f89995b4328d3468df9914e3c6b6 (patch)
tree28a7c2dec8479ba504adcc9a96f4769657bcc528
parent8954ee650fbaa60a8766999f138557d5c8c12339 (diff)
downloadrails-ef64c6ba8c06f89995b4328d3468df9914e3c6b6.tar.gz
rails-ef64c6ba8c06f89995b4328d3468df9914e3c6b6.tar.bz2
rails-ef64c6ba8c06f89995b4328d3468df9914e3c6b6.zip
Remove 'needless boolean casting'.
"Predicates in Rails rely on standard Ruby semantics for boolean values and guarantee no singletons whatsoever." - @fxn
-rw-r--r--activerecord/lib/active_record/relation/finder_methods.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb
index 52e67ecc6e..2c74f4011d 100644
--- a/activerecord/lib/active_record/relation/finder_methods.rb
+++ b/activerecord/lib/active_record/relation/finder_methods.rb
@@ -200,7 +200,7 @@ module ActiveRecord
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