Method: ActiveRecord::ConnectionAdapters::SchemaStatements#table_alias_for

Defined in:
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb

#table_alias_for(table_name) ⇒ Object

Truncates a table alias according to the limits of the current adapter.



29
30
31
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb', line 29

def table_alias_for(table_name)
  table_name[0...table_alias_length].tr(".", "_")
end