Added user_autocompletion as possible attribute.

This commit is contained in:
Martin Edenhofer 2017-04-10 15:02:13 +02:00
parent c662df0d11
commit dbbcb5175e

View file

@ -546,7 +546,7 @@ to send no browser reload event, pass false
data_type = nil data_type = nil
if attribute.data_type =~ /^input|select|richtext|textarea|checkbox$/ if attribute.data_type =~ /^input|select|richtext|textarea|checkbox$/
data_type = :string data_type = :string
elsif attribute.data_type =~ /^integer$/ elsif attribute.data_type =~ /^integer|user_autocompletion$/
data_type = :integer data_type = :integer
elsif attribute.data_type =~ /^boolean|active$/ elsif attribute.data_type =~ /^boolean|active$/
data_type = :boolean data_type = :boolean
@ -566,7 +566,7 @@ to send no browser reload event, pass false
limit: attribute.data_option[:maxlength], limit: attribute.data_option[:maxlength],
null: true null: true
) )
elsif attribute.data_type =~ /^integer|datetime|date$/ elsif attribute.data_type =~ /^integer|user_autocompletion|datetime|date$/
ActiveRecord::Migration.change_column( ActiveRecord::Migration.change_column(
model.table_name, model.table_name,
attribute.name, attribute.name,
@ -603,7 +603,7 @@ to send no browser reload event, pass false
limit: attribute.data_option[:maxlength], limit: attribute.data_option[:maxlength],
null: true null: true
) )
elsif attribute.data_type =~ /^integer$/ elsif attribute.data_type =~ /^integer|user_autocompletion$/
ActiveRecord::Migration.add_column( ActiveRecord::Migration.add_column(
model.table_name, model.table_name,
attribute.name, attribute.name,