diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-05-02 03:14:31 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-05-02 03:14:31 -0300 |
commit | f44853a5aa7f4481d99a3af4585f3a51272bc7f7 (patch) | |
tree | ad5358836713a7235081447cfd246de2eaa73812 | |
parent | 092c2be685e8e359c161144ce58addac6caa5c44 (diff) | |
download | rails-f44853a5aa7f4481d99a3af4585f3a51272bc7f7.tar.gz rails-f44853a5aa7f4481d99a3af4585f3a51272bc7f7.tar.bz2 rails-f44853a5aa7f4481d99a3af4585f3a51272bc7f7.zip |
COUNT should return an integer
-rw-r--r-- | lib/arel/relations/relation.rb | 2 |
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)) |