Class: ActiveRecord::Associations::JoinDependency::Aliases::Table

Inherits:
Struct
  • Object
show all
Defined in:
activerecord/lib/active_record/associations/join_dependency.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Struct

#as_json

Instance Attribute Details

#columnsObject

Returns the value of attribute columns

Returns:

  • (Object)

    the current value of columns



38
39
40
# File 'activerecord/lib/active_record/associations/join_dependency.rb', line 38

def columns
  @columns
end

#nodeObject

Returns the value of attribute node

Returns:

  • (Object)

    the current value of node



38
39
40
# File 'activerecord/lib/active_record/associations/join_dependency.rb', line 38

def node
  @node
end

Instance Method Details

#column_aliasesObject



39
40
41
42
# File 'activerecord/lib/active_record/associations/join_dependency.rb', line 39

def column_aliases
  t = node.table
  columns.map { |column| t[column.name].as(column.alias) }
end