instance method
table_alias_for
Ruby on Rails 3.1.12
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 14
def table_alias_for(table_name)
table_name[0...table_alias_length].gsub(/\./, '_')
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb line 14
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::SchemaStatements