instance method
table_alias_for
Ruby on Rails 4.1.16
Since v2.2.3Signature
table_alias_for(table_name)
Truncates a table alias according to the limits of the current adapter.
Parameters
-
table_namereq
Source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb, line 16
def table_alias_for(table_name)
table_name[0...table_alias_length].tr('.', '_')
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb line 16
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::SchemaStatements