From f44853a5aa7f4481d99a3af4585f3a51272bc7f7 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Sat, 2 May 2009 03:14:31 -0300 Subject: COUNT should return an integer --- lib/arel/relations/relation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/arel') 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)) -- cgit v1.2.3