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