Solves #3153. It refactors images attributes.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
class Admin::MilestonesController < Admin::BaseController
|
||||
include Translatable
|
||||
include ImagesHelper
|
||||
|
||||
before_action :load_milestoneable, only: [:index, :new, :create, :edit, :update, :destroy]
|
||||
before_action :load_milestone, only: [:edit, :update, :destroy]
|
||||
@@ -41,7 +42,6 @@ class Admin::MilestonesController < Admin::BaseController
|
||||
private
|
||||
|
||||
def milestone_params
|
||||
image_attributes = [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy]
|
||||
documents_attributes = [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy]
|
||||
attributes = [:publication_date, :status_id,
|
||||
translation_params(Milestone),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class Admin::Poll::PollsController < Admin::Poll::BaseController
|
||||
include Translatable
|
||||
include ImagesHelper
|
||||
load_and_authorize_resource
|
||||
|
||||
before_action :load_search, only: [:search_booths, :search_officers]
|
||||
@@ -60,7 +61,6 @@ class Admin::Poll::PollsController < Admin::Poll::BaseController
|
||||
end
|
||||
|
||||
def poll_params
|
||||
image_attributes = [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy]
|
||||
attributes = [:name, :starts_at, :ends_at, :geozone_restricted, :results_enabled,
|
||||
:stats_enabled, geozone_ids: [],
|
||||
image_attributes: image_attributes]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class Admin::Widget::CardsController < Admin::BaseController
|
||||
include Translatable
|
||||
include ImagesHelper
|
||||
|
||||
def new
|
||||
@card = ::Widget::Card.new(header: header_card?)
|
||||
@@ -40,8 +41,6 @@ class Admin::Widget::CardsController < Admin::BaseController
|
||||
private
|
||||
|
||||
def card_params
|
||||
image_attributes = [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy]
|
||||
|
||||
params.require(:widget_card).permit(
|
||||
:link_url, :button_text, :button_url, :alignment, :header,
|
||||
translation_params(Widget::Card),
|
||||
|
||||
Reference in New Issue
Block a user