mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert "Work around count returning string (bug)"
This reverts commit 4bb6f77059
.
This commit is contained in:
parent
3fd467e9ed
commit
d522b7ccf6
1 changed files with 1 additions and 1 deletions
|
@ -690,7 +690,7 @@ module ActiveRecord #:nodoc:
|
||||||
def exists?(id_or_conditions = {})
|
def exists?(id_or_conditions = {})
|
||||||
construct_finder_arel({
|
construct_finder_arel({
|
||||||
:conditions =>expand_id_conditions(id_or_conditions)
|
: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
|
end
|
||||||
|
|
||||||
# Creates an object (or multiple objects) and saves it to the database, if validations pass.
|
# Creates an object (or multiple objects) and saves it to the database, if validations pass.
|
||||||
|
|
Loading…
Reference in a new issue