Changes suggested in PR:
* Delete all things related to banner images and styles (in code) * Add a new test to check that the banner is showing correctly * Update the specs accordingly to match the changes Update dev_seed to set a random background_color and a font_color for banners (and remove everything about image and style) Add a rake task to migrate the banner style to backgroun_color and font_color (so that the banners have the same colors than before)
This commit is contained in:
@@ -2,8 +2,6 @@ class Admin::BannersController < Admin::BaseController
|
||||
|
||||
has_filters %w{all with_active with_inactive}, only: :index
|
||||
|
||||
before_action :banner_styles, only: [:edit, :new, :create, :update]
|
||||
before_action :banner_imgs, only: [:edit, :new, :create, :update]
|
||||
before_action :banner_sections, only: [:edit, :new, :create, :update]
|
||||
|
||||
respond_to :html, :js
|
||||
@@ -39,7 +37,7 @@ class Admin::BannersController < Admin::BaseController
|
||||
private
|
||||
|
||||
def banner_params
|
||||
attributes = [:title, :description, :target_url, :style, :image,
|
||||
attributes = [:title, :description, :target_url,
|
||||
:post_started_at, :post_ended_at,
|
||||
:background_color, :font_color,
|
||||
web_section_ids: []]
|
||||
|
||||
Reference in New Issue
Block a user