Class: Arel::Sql::OrderClause

Inherits:
PassThrough show all
Defined in:
lib/arel/engines/sql/formatters.rb

Instance Attribute Summary

Attributes inherited from Formatter

#environment

Instance Method Summary collapse

Methods inherited from PassThrough

#value

Methods inherited from Formatter

#initialize

Constructor Details

This class inherits a constructor from Arel::Sql::Formatter

Instance Method Details

#ordering(ordering) ⇒ Object



49
50
51
# File 'lib/arel/engines/sql/formatters.rb', line 49

def ordering(ordering)
  "#{quote_table_name(name_for(ordering.attribute.original_relation))}.#{quote_column_name(ordering.attribute.name)} #{ordering.direction_sql}"
end