diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-05-06 14:14:56 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-05-06 14:14:56 -0300 |
commit | a7dea38204f3c40e4d0c3f29ebe17af818659697 (patch) | |
tree | 3a3a912b74b15509c715ec5028b18da49bd30d44 /lib | |
parent | de843c86518e4ac871d4bb5b0873bb6c184ac304 (diff) | |
download | rails-a7dea38204f3c40e4d0c3f29ebe17af818659697.tar.gz rails-a7dea38204f3c40e4d0c3f29ebe17af818659697.tar.bz2 rails-a7dea38204f3c40e4d0c3f29ebe17af818659697.zip |
Don't depend engine select_value(s) method. Quoting should be performed by connection not ARel
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/relations/relation.rb | 9 | ||||
-rw-r--r-- | lib/arel/sql/formatters.rb | 2 |
2 files changed, 1 insertions, 10 deletions
diff --git a/lib/arel/relations/relation.rb b/lib/arel/relations/relation.rb index 466ee66f64..5d2c336a15 100644 --- a/lib/arel/relations/relation.rb +++ b/lib/arel/relations/relation.rb @@ -6,17 +6,8 @@ module Arel Session.new end - def select_value - engine.select_value self.to_sql - end - - def select_values - engine.select_values self.to_sql - end - def count @count = "COUNT(*) AS count_all" - engine.select_value(self.to_sql).to_i end def to_sql(formatter = Sql::SelectStatement.new(self)) diff --git a/lib/arel/sql/formatters.rb b/lib/arel/sql/formatters.rb index d8618ca2cc..f82ddf631f 100644 --- a/lib/arel/sql/formatters.rb +++ b/lib/arel/sql/formatters.rb @@ -69,7 +69,7 @@ module Arel end def value(value) - quote value.to_sql(self) + value.to_sql(self) end def scalar(value, column = nil) |