Class: ActiveRecord::Associations::JoinDependency::Aliases::Table
- Inherits:
-
Struct
- Object
- Struct
- ActiveRecord::Associations::JoinDependency::Aliases::Table
- Defined in:
- lib/active_record/associations/join_dependency.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#node ⇒ Object
Returns the value of attribute node.
Instance Method Summary collapse
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns
35 36 37 |
# File 'lib/active_record/associations/join_dependency.rb', line 35 def columns @columns end |
#node ⇒ Object
Returns the value of attribute node
35 36 37 |
# File 'lib/active_record/associations/join_dependency.rb', line 35 def node @node end |
Instance Method Details
#column_aliases ⇒ Object
40 41 42 43 |
# File 'lib/active_record/associations/join_dependency.rb', line 40 def column_aliases t = table columns.map { |column| t[column.name].as Arel.sql column.alias } end |
#table ⇒ Object
36 37 38 |
# File 'lib/active_record/associations/join_dependency.rb', line 36 def table Arel::Nodes::TableAlias.new node.table, node.aliased_table_name end |