Solves #3153. It refactors images attributes.

This commit is contained in:
rogelio-o
2019-01-12 17:42:55 +01:00
parent cc288fcedd
commit ea76179002
7 changed files with 13 additions and 7 deletions

View File

@@ -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]