aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-05-02 03:14:31 -0300
committerEmilio Tagua <miloops@gmail.com>2009-05-02 03:14:31 -0300
commitf44853a5aa7f4481d99a3af4585f3a51272bc7f7 (patch)
treead5358836713a7235081447cfd246de2eaa73812 /lib
parent092c2be685e8e359c161144ce58addac6caa5c44 (diff)
downloadrails-f44853a5aa7f4481d99a3af4585f3a51272bc7f7.tar.gz
rails-f44853a5aa7f4481d99a3af4585f3a51272bc7f7.tar.bz2
rails-f44853a5aa7f4481d99a3af4585f3a51272bc7f7.zip
COUNT should return an integer
Diffstat (limited to 'lib')
-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))