instance method
add_index_length
Ruby on Rails 5.1.7
Since v3.2.22.5 Last seen in v5.1.7 Private — implementation detail, not part of the public APISignature
add_index_length(quoted_columns, **options)
No documentation comment.
Parameters
-
quoted_columnsreq -
optionskeyrest
Source
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 658
def add_index_length(quoted_columns, **options)
if length = options[:length]
case length
when Hash
length = length.symbolize_keys
quoted_columns.each { |name, column| column << "(#{length[name]})" if length[name].present? }
when Integer
quoted_columns.each { |name, column| column << "(#{length})" }
end
end
quoted_columns
end
Defined in activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb line 658
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter