parent
730d610e39
commit
a101a67374
@ -0,0 +1,14 @@ |
||||
<% field_name = ActiveModel::Naming.param_key(object) %> |
||||
|
||||
<div class="form--field"> |
||||
<label class="form--label" for="<%= field_name %>_color_id"> |
||||
<%= object.class.human_attribute_name 'color' %> |
||||
</label> |
||||
<div class="form--field-container"> |
||||
<div class="form--select-container -middle"> |
||||
<colors-autocompleter label="<%= object.class.human_attribute_name 'color' %>"> |
||||
<%= select_tag "#{field_name}[color_id]", options_for_colors(object), hidden: true %> |
||||
</colors-autocompleter> |
||||
<div class="form--field-instructions -no-margin"><%= label %></div> |
||||
</div> |
||||
</div> |
@ -1,7 +0,0 @@ |
||||
class AddColorToStatuses < ActiveRecord::Migration[5.1] |
||||
def change |
||||
change_table :statuses do |t| |
||||
t.belongs_to :color, type: :int |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,11 @@ |
||||
class AddColorToStatusesAndEnumerations < ActiveRecord::Migration[5.1] |
||||
def change |
||||
change_table :statuses do |t| |
||||
t.belongs_to :color, type: :int |
||||
end |
||||
|
||||
change_table :enumerations do |t| |
||||
t.belongs_to :color, type: :int |
||||
end |
||||
end |
||||
end |
Loading…
Reference in new issue