diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-29 13:47:44 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-29 13:47:44 -0700 |
commit | dfe79da73e13d44294ce5b167d6519b394cefa1b (patch) | |
tree | a9bba8e8d93fc68b75853b1d17369cafc858f83f /lib/arel | |
parent | 4d271c96b9e090a3fa75797f82e8d1d423a009c8 (diff) | |
download | rails-dfe79da73e13d44294ce5b167d6519b394cefa1b.tar.gz rails-dfe79da73e13d44294ce5b167d6519b394cefa1b.tar.bz2 rails-dfe79da73e13d44294ce5b167d6519b394cefa1b.zip |
PERF: fewer objects, pass through on values
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/algebra/relations/relation.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb index dd0684b88e..eeb5918f4b 100644 --- a/lib/arel/algebra/relations/relation.rb +++ b/lib/arel/algebra/relations/relation.rb @@ -65,7 +65,14 @@ module Arel end def select_clauses - attributes.collect { |a| a.to_sql(Sql::SelectClause.new(self)) } + attributes.map { |a| + case a + when Value + a.value + else + a.to_sql(Sql::SelectClause.new(self)) + end + } end def from_clauses |