aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel')
-rw-r--r--lib/arel/relations/relation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/arel/relations/relation.rb b/lib/arel/relations/relation.rb
index 50c46aa2ed..466ee66f64 100644
--- a/lib/arel/relations/relation.rb
+++ b/lib/arel/relations/relation.rb
@@ -16,7 +16,7 @@ module Arel
def count
@count = "COUNT(*) AS count_all"
- engine.select_value self.to_sql
+ engine.select_value(self.to_sql).to_i
end
def to_sql(formatter = Sql::SelectStatement.new(self))