diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 14:58:46 -0400 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 14:58:46 -0400 |
commit | 4e3c9a01307339916f6b947d24f19b0f442afd78 (patch) | |
tree | 21d75fb31b0c920deaeb8eb0d8c71e84525dca50 /lib/arel/engines/sql/formatters.rb | |
parent | 437429764510338bdc5f4915286425f07565a573 (diff) | |
download | rails-4e3c9a01307339916f6b947d24f19b0f442afd78.tar.gz rails-4e3c9a01307339916f6b947d24f19b0f442afd78.tar.bz2 rails-4e3c9a01307339916f6b947d24f19b0f442afd78.zip |
most in memory operations save join and group
Conflicts:
lib/arel/algebra/extensions/object.rb
lib/arel/algebra/primitives/value.rb
lib/arel/engines/memory/relations.rb
lib/arel/engines/sql/formatters.rb
lib/arel/engines/sql/primitives.rb
spec/arel/unit/relations/alias_spec.rb
spec/arel/unit/relations/array_spec.rb
spec/arel/unit/relations/order_spec.rb
Diffstat (limited to 'lib/arel/engines/sql/formatters.rb')
-rw-r--r-- | lib/arel/engines/sql/formatters.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/arel/engines/sql/formatters.rb b/lib/arel/engines/sql/formatters.rb index f82ddf631f..bc5f0f7c64 100644 --- a/lib/arel/engines/sql/formatters.rb +++ b/lib/arel/engines/sql/formatters.rb @@ -47,9 +47,9 @@ module Arel class WhereClause < PassThrough end - class OrderClause < PassThrough - def attribute(attribute) - "#{quote_table_name(name_for(attribute.original_relation))}.#{quote_column_name(attribute.name)}" + class OrderClause < PassThrough + def ordering(ordering) + "#{quote_table_name(name_for(ordering.attribute.original_relation))}.#{quote_column_name(ordering.attribute.name)} #{ordering.direction_sql}" end end |