From 393b5d1a3fcb1106734dbb6a3d3eec52f42368bf Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 3 Jul 2016 15:39:56 +0200 Subject: Add category field to banners table. --- app/views/refinery/banners/admin/banners/_form.html.erb | 5 +++++ db/migrate/5_add_category_to_banners.rb | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 db/migrate/5_add_category_to_banners.rb diff --git a/app/views/refinery/banners/admin/banners/_form.html.erb b/app/views/refinery/banners/admin/banners/_form.html.erb index 2d6d848..5ff1584 100644 --- a/app/views/refinery/banners/admin/banners/_form.html.erb +++ b/app/views/refinery/banners/admin/banners/_form.html.erb @@ -41,6 +41,11 @@ +
+ <%= f.label :category -%> + <%= f.text_field :category %> +
+ <% if Refinery::I18n.frontend_locales %>
<%= f.label :locale -%> diff --git a/db/migrate/5_add_category_to_banners.rb b/db/migrate/5_add_category_to_banners.rb new file mode 100644 index 0000000..6975c89 --- /dev/null +++ b/db/migrate/5_add_category_to_banners.rb @@ -0,0 +1,5 @@ +class AddCategoryToBanners < ActiveRecord::Migration + def change + add_column :refinery_banners, :category, :string + end +end -- cgit v1.2.3