Automatically create a budget poll if it does not exist

This commit is contained in:
rgarcia
2018-06-12 13:41:03 +02:00
committed by Javi Martín
parent 8cfcfcb6a7
commit 6fa7562181
4 changed files with 43 additions and 7 deletions

View File

@@ -63,7 +63,7 @@ class Admin::Poll::PollsController < Admin::Poll::BaseController
def poll_params
attributes = [:name, :starts_at, :ends_at, :geozone_restricted, :results_enabled,
:stats_enabled, geozone_ids: [],
:stats_enabled, :budget_id, geozone_ids: [],
image_attributes: image_attributes]
params.require(:poll).permit(*attributes, translation_params(Poll))
end