diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-11-22 15:50:36 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-11-22 17:06:57 +0800 |
commit | 07d3d44775f6cc5b7a1b768cb4e5b7900d543815 (patch) | |
tree | 9b87200493dfc56a64aa6716ff4f03794b8f24c3 /app/controllers/concerns/issuable_actions.rb | |
parent | 15edf741a14a53443fb39ecb59888e75697b9c2b (diff) | |
download | gitlab-ce-07d3d44775f6cc5b7a1b768cb4e5b7900d543815.tar.gz |
Move ModuleWithInstanceVariables to Gitlab namespace
And use .rubocop.yml to exclude paths we don't care,
rather than using the cop itself to exclude.
Diffstat (limited to 'app/controllers/concerns/issuable_actions.rb')
-rw-r--r-- | app/controllers/concerns/issuable_actions.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/controllers/concerns/issuable_actions.rb b/app/controllers/concerns/issuable_actions.rb index b1a7a53f94a..a725aad43e7 100644 --- a/app/controllers/concerns/issuable_actions.rb +++ b/app/controllers/concerns/issuable_actions.rb @@ -17,7 +17,7 @@ module IssuableActions end def update - @issuable = update_service.execute(issuable) # rubocop:disable Cop/ModuleWithInstanceVariables + @issuable = update_service.execute(issuable) # rubocop:disable Gitlab/ModuleWithInstanceVariables respond_to do |format| format.html do @@ -83,7 +83,7 @@ module IssuableActions def render_conflict_response respond_to do |format| format.html do - @conflict = true # rubocop:disable Cop/ModuleWithInstanceVariables + @conflict = true # rubocop:disable Gitlab/ModuleWithInstanceVariables render :edit end @@ -98,7 +98,7 @@ module IssuableActions end def labels - @labels ||= LabelsFinder.new(current_user, project_id: @project.id).execute # rubocop:disable Cop/ModuleWithInstanceVariables + @labels ||= LabelsFinder.new(current_user, project_id: @project.id).execute # rubocop:disable Gitlab/ModuleWithInstanceVariables end def authorize_destroy_issuable! @@ -108,7 +108,7 @@ module IssuableActions end def authorize_admin_issuable! - unless can?(current_user, :"admin_#{resource_name}", @project) # rubocop:disable Cop/ModuleWithInstanceVariables + unless can?(current_user, :"admin_#{resource_name}", @project) # rubocop:disable Gitlab/ModuleWithInstanceVariables return access_denied! end end @@ -142,7 +142,7 @@ module IssuableActions @resource_name ||= controller_name.singularize end - # rubocop:disable Cop/ModuleWithInstanceVariables + # rubocop:disable Gitlab/ModuleWithInstanceVariables def render_entity_json if @issuable.valid? render json: serializer.represent(@issuable) @@ -150,7 +150,7 @@ module IssuableActions render json: { errors: @issuable.errors.full_messages }, status: :unprocessable_entity end end - # rubocop:enable Cop/ModuleWithInstanceVariables + # rubocop:enable Gitlab/ModuleWithInstanceVariables def serializer raise NotImplementedError @@ -161,6 +161,6 @@ module IssuableActions end def parent - @project || @group # rubocop:disable Cop/ModuleWithInstanceVariables + @project || @group # rubocop:disable Gitlab/ModuleWithInstanceVariables end end |