Commit 9a6b9499 authored by Justin Ho's avatar Justin Ho

Use IntegrationsHelper for scoped paths

In group / admin controllers, we had some redundant
scoped edit paths. This is now replaced with a method
in IntegrationsHelper so it's cleaner to consolidate here.
parent 68ca8bf9
...@@ -25,8 +25,4 @@ class Admin::IntegrationsController < Admin::ApplicationController ...@@ -25,8 +25,4 @@ class Admin::IntegrationsController < Admin::ApplicationController
def find_or_initialize_non_project_specific_integration(name) def find_or_initialize_non_project_specific_integration(name)
Integration.find_or_initialize_non_project_specific_integration(name, instance: true) Integration.find_or_initialize_non_project_specific_integration(name, instance: true)
end end
def scoped_edit_integration_path(integration)
edit_admin_application_settings_integration_path(integration)
end
end end
...@@ -4,6 +4,7 @@ module Groups ...@@ -4,6 +4,7 @@ module Groups
module Settings module Settings
class IntegrationsController < Groups::ApplicationController class IntegrationsController < Groups::ApplicationController
include IntegrationsActions include IntegrationsActions
include IntegrationsHelper
before_action :authorize_admin_group! before_action :authorize_admin_group!
...@@ -26,10 +27,6 @@ module Groups ...@@ -26,10 +27,6 @@ module Groups
def find_or_initialize_non_project_specific_integration(name) def find_or_initialize_non_project_specific_integration(name)
Integration.find_or_initialize_non_project_specific_integration(name, group_id: group.id) Integration.find_or_initialize_non_project_specific_integration(name, group_id: group.id)
end end
def scoped_edit_integration_path(integration)
edit_group_settings_integration_path(group, integration)
end
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment