diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-05-02 12:59:49 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-05-02 12:59:49 -0300 |
commit | d522b7ccf61a71b4c66ddf39368513d1fd9cd577 (patch) | |
tree | 49b342fdd8d27a94a7b5169a039e1de190c19157 /activerecord/lib | |
parent | 3fd467e9ed7f3a8d408ab2cb0782a5b13bb3f629 (diff) | |
download | rails-d522b7ccf61a71b4c66ddf39368513d1fd9cd577.tar.gz rails-d522b7ccf61a71b4c66ddf39368513d1fd9cd577.tar.bz2 rails-d522b7ccf61a71b4c66ddf39368513d1fd9cd577.zip |
Revert "Work around count returning string (bug)"
This reverts commit 4bb6f77059a34ea7c8575523397032b4cc67e00a.
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index b1ae2fbe78..3b693b5f17 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -690,7 +690,7 @@ module ActiveRecord #:nodoc: 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. |