Permalink
Browse files

Revert "Work around count returning string (bug)"

This reverts commit 4bb6f77.
  • Loading branch information...
1 parent 3fd467e commit d522b7ccf61a71b4c66ddf39368513d1fd9cd577 @miloops miloops committed May 2, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/base.rb
@@ -690,7 +690,7 @@ def find_by_sql(sql)
def exists?(id_or_conditions = {})
construct_finder_arel({
:conditions =>expand_id_conditions(id_or_conditions)
- }).project(arel_table[primary_key]).take(1).count.to_i > 0
+ }).project(arel_table[primary_key]).take(1).count > 0
end
# Creates an object (or multiple objects) and saves it to the database, if validations pass.

0 comments on commit d522b7c

Please sign in to comment.