From 8ffc859a9bf7c364021bbb4678b1a542155b75be Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 18 Oct 2015 13:58:44 +0300 Subject: [PATCH] Add a CSS Style string to tracks by request of @krokodilerian --- app/controllers/management/conferences_controller.rb | 2 +- app/views/management/conferences/_form_tracks.html.slim | 1 + db/migrate/20151018105806_add_css_style_string_to_tracks.rb | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20151018105806_add_css_style_string_to_tracks.rb diff --git a/app/controllers/management/conferences_controller.rb b/app/controllers/management/conferences_controller.rb index 61a6f03..f9ae547 100644 --- a/app/controllers/management/conferences_controller.rb +++ b/app/controllers/management/conferences_controller.rb @@ -56,7 +56,7 @@ module Management event_types_attributes: [:id, :name, :description, :maximum_length, :minimum_length, :_destroy], tracks_attributes: [:id, :name, :color, :css_class, :description, - :_destroy], + :css_style, :_destroy], halls_attributes: [:id, :name, :_destroy], volunteer_teams_attributes: [:id, :name, :description, :color, :_destroy] ) diff --git a/app/views/management/conferences/_form_tracks.html.slim b/app/views/management/conferences/_form_tracks.html.slim index 7151918..8929aea 100644 --- a/app/views/management/conferences/_form_tracks.html.slim +++ b/app/views/management/conferences/_form_tracks.html.slim @@ -11,6 +11,7 @@ div#tracks = ff.input :name = ff.input :color, as: :color = ff.input :css_class + = ff.input :css_style = ff.input :description .col-lg-6 .panel.panel-default diff --git a/db/migrate/20151018105806_add_css_style_string_to_tracks.rb b/db/migrate/20151018105806_add_css_style_string_to_tracks.rb new file mode 100644 index 0000000..b41214e --- /dev/null +++ b/db/migrate/20151018105806_add_css_style_string_to_tracks.rb @@ -0,0 +1,5 @@ +class AddCssStyleStringToTracks < ActiveRecord::Migration + def change + add_column :tracks, :css_style, :text + end +end