diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-07-06 23:52:00 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-07-20 02:57:59 +0300 |
commit | 8bd520d70e035cd67d19b7962911ae9c31d1ff3d (patch) | |
tree | dd3e8bf4925f36758825879857a54b7d5e94a638 /app/controllers/admin/services_controller.rb | |
parent | b9ed9d658ad447a64d58b2040849a7cc0e698287 (diff) |
Allow slack service to send messages on different channels
Diffstat (limited to 'app/controllers/admin/services_controller.rb')
-rw-r--r-- | app/controllers/admin/services_controller.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb index 46133588332..40938986a92 100644 --- a/app/controllers/admin/services_controller.rb +++ b/app/controllers/admin/services_controller.rb @@ -39,11 +39,14 @@ class Admin::ServicesController < Admin::ApplicationController end def application_services_params + dynamic_params = [] + dynamic_params.concat(@service.event_channel_names) if @service.is_a?(SlackService) + application_services_params = params.permit(:id, - service: Projects::ServicesController::ALLOWED_PARAMS) + service: Projects::ServicesController::ALLOWED_PARAMS + dynamic_params) if application_services_params[:service].is_a?(Hash) Projects::ServicesController::FILTER_BLANK_PARAMS.each do |param| - application_services_params[:service].delete(param) if application_services_params[:service][param].blank? + application_services_params[:service].delete(param) if application_services_params[:service][param].blank? end end application_services_params |