diff --git a/app/controllers/dashboard/polls_controller.rb b/app/controllers/dashboard/polls_controller.rb index 76fa56053..563434944 100644 --- a/app/controllers/dashboard/polls_controller.rb +++ b/app/controllers/dashboard/polls_controller.rb @@ -1,6 +1,4 @@ class Dashboard::PollsController < Dashboard::BaseController - before_action :load_geozones, only: [:new, :create, :edit, :update] - helper_method :poll def index @@ -54,23 +52,14 @@ class Dashboard::PollsController < Dashboard::BaseController @poll ||= Poll.includes(:questions).find(params[:id]) end - def load_geozones - @geozones = Geozone.all.order(:name) - end - def poll_params params.require(:poll).permit(poll_attributes) end def poll_attributes - [:name, :starts_at, :ends_at, :geozone_restricted, :summary, :description, - :results_enabled, :stats_enabled, geozone_ids: [], - questions_attributes: question_attributes, - image_attributes: image_attributes] - end - - def image_attributes - [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy] + [:name, :starts_at, :ends_at, :description, + :results_enabled, :stats_enabled, + questions_attributes: question_attributes] end def question_attributes diff --git a/app/views/dashboard/polls/_form.html.erb b/app/views/dashboard/polls/_form.html.erb index c34ecadd4..e134d971b 100644 --- a/app/views/dashboard/polls/_form.html.erb +++ b/app/views/dashboard/polls/_form.html.erb @@ -19,42 +19,12 @@ -