Commit 5978f535 authored by Valery Sizov's avatar Valery Sizov

Fix rubocop offences

parent 1a7f9926
...@@ -24,8 +24,7 @@ module Projects ...@@ -24,8 +24,7 @@ module Projects
private private
def redirect_to_service_page def redirect_to_service_page
redirect_to edit_namespace_project_service_path( redirect_to edit_project_service_path(
project.namespace,
project, project,
project.gitlab_slack_application_service || project.build_gitlab_slack_application_service project.gitlab_slack_application_service || project.build_gitlab_slack_application_service
) )
......
...@@ -75,7 +75,7 @@ module AuthHelper ...@@ -75,7 +75,7 @@ module AuthHelper
end end
def slack_redirect_uri(project) def slack_redirect_uri(project)
slack_auth_namespace_project_settings_slack_url(project.namespace, project) slack_auth_project_settings_slack_url(project)
end end
extend self extend self
......
...@@ -89,7 +89,7 @@ class Project < ActiveRecord::Base ...@@ -89,7 +89,7 @@ class Project < ActiveRecord::Base
# Project services # Project services
has_one :campfire_service has_one :campfire_service
has_one :drone_ci_service has_one :drone_ci_service
has_one :gitlab_slack_application_service, dependent: :destroy has_one :gitlab_slack_application_service
has_one :emails_on_push_service has_one :emails_on_push_service
has_one :pipelines_email_service has_one :pipelines_email_service
has_one :irker_service has_one :irker_service
......
...@@ -55,7 +55,7 @@ module Projects ...@@ -55,7 +55,7 @@ module Projects
HTTParty.get(SLACK_EXCHANGE_TOKEN_URL, query: { HTTParty.get(SLACK_EXCHANGE_TOKEN_URL, query: {
client_id: current_application_settings.slack_app_id, client_id: current_application_settings.slack_app_id,
client_secret: current_application_settings.slack_app_secret, client_secret: current_application_settings.slack_app_secret,
redirect_uri: slack_auth_namespace_project_settings_slack_url(project.namespace, project), redirect_uri: slack_auth_project_settings_slack_url(project),
code: params[:code] code: params[:code]
}) })
end end
......
...@@ -11,8 +11,7 @@ describe Projects::Settings::SlacksController do ...@@ -11,8 +11,7 @@ describe Projects::Settings::SlacksController do
describe 'GET show' do describe 'GET show' do
def redirect_url(project) def redirect_url(project)
edit_namespace_project_service_path( edit_project_service_path(
project.namespace,
project, project,
project.build_gitlab_slack_application_service project.build_gitlab_slack_application_service
) )
......
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