Commit 7d903519 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'rc/enable_rails_cops' into 'master'

Enable Rails rubocops

See merge request gitlab-org/gitlab!23101
parents 9d154542 c9a865ac
...@@ -301,24 +301,6 @@ RSpec/AnyInstanceOf: ...@@ -301,24 +301,6 @@ RSpec/AnyInstanceOf:
Enabled: false Enabled: false
# Cops for upgrade to gitlab-styles 3.1.0 # Cops for upgrade to gitlab-styles 3.1.0
Rails/SafeNavigationWithBlank:
Enabled: false
Rails/ApplicationController:
Enabled: false
Rails/ApplicationMailer:
Enabled: false
Rails/RakeEnvironment:
Enabled: false
Rails/HelperInstanceVariable:
Enabled: false
Rails/EnumHash:
Enabled: false
RSpec/ReceiveCounts: RSpec/ReceiveCounts:
Enabled: false Enabled: false
...@@ -369,3 +351,4 @@ Style/MultilineWhenThen: ...@@ -369,3 +351,4 @@ Style/MultilineWhenThen:
Style/FloatDivision: Style/FloatDivision:
Enabled: false Enabled: false
\ No newline at end of file
This diff is collapsed.
...@@ -223,19 +223,19 @@ class User < ApplicationRecord ...@@ -223,19 +223,19 @@ class User < ApplicationRecord
after_initialize :set_projects_limit after_initialize :set_projects_limit
# User's Layout preference # User's Layout preference
enum layout: [:fixed, :fluid] enum layout: { fixed: 0, fluid: 1 }
# User's Dashboard preference # User's Dashboard preference
# Note: When adding an option, it MUST go on the end of the array. # Note: When adding an option, it MUST go on the end of the array.
enum dashboard: [:projects, :stars, :project_activity, :starred_project_activity, :groups, :todos, :issues, :merge_requests, :operations] enum dashboard: { projects: 0, stars: 1, project_activity: 2, starred_project_activity: 3, groups: 4, todos: 5, issues: 6, merge_requests: 7, operations: 8 }
# User's Project preference # User's Project preference
# Note: When adding an option, it MUST go on the end of the array. # Note: When adding an option, it MUST go on the end of the array.
enum project_view: [:readme, :activity, :files] enum project_view: { readme: 0, activity: 1, files: 2 }
# User's role # User's role
# Note: When adding an option, it MUST go on the end of the array. # Note: When adding an option, it MUST go on the end of the array.
enum role: [:software_developer, :development_team_lead, :devops_engineer, :systems_administrator, :security_analyst, :data_analyst, :product_manager, :product_designer, :other], _suffix: true enum role: { software_developer: 0, development_team_lead: 1, devops_engineer: 2, systems_administrator: 3, security_analyst: 4, data_analyst: 5, product_manager: 6, product_designer: 7, other: 8 }, _suffix: true
delegate :path, to: :namespace, allow_nil: true, prefix: true delegate :path, to: :namespace, allow_nil: true, prefix: true
delegate :notes_filter_for, to: :user_preference delegate :notes_filter_for, to: :user_preference
......
...@@ -105,7 +105,7 @@ module EE ...@@ -105,7 +105,7 @@ module EE
return unless group.allowed_email_domain.present? return unless group.allowed_email_domain.present?
return unless allowed_domain_params return unless allowed_domain_params
if allowed_domain_params[:domain]&.blank? if allowed_domain_params[:domain].blank?
allowed_domain_params[:_destroy] = 1 allowed_domain_params[:_destroy] = 1
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