Skip to content

Commit

Permalink
Enable Style/SymbolArray
Browse files Browse the repository at this point in the history
  • Loading branch information
gregoirenovel committed Oct 3, 2018
1 parent dbdeafb commit a80d6f1
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,8 @@ Style/StructInheritance:
Enabled: false

Style/SymbolArray:
Enabled: false
Enabled: true
EnforcedStyle: brackets

Style/SymbolLiteral:
Enabled: true
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def reject
elsif api_request
render json: { error: MAINTENANCE_MESSAGE }.to_json, status: :service_unavailable
else
%i(user gestionnaire administrateur).each { |role| sign_out(role) }
[:user, :gestionnaire, :administrateur].each { |role| sign_out(role) }
flash[:alert] = MAINTENANCE_MESSAGE
redirect_to root_path
end
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/gestionnaires/passwords_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Gestionnaires::PasswordsController < Devise::PasswordsController
after_action :try_to_authenticate_user, only: %i(update)
after_action :try_to_authenticate_administrateur, only: %i(update)
after_action :try_to_authenticate_user, only: [:update]
after_action :try_to_authenticate_administrateur, only: [:update]

# GET /resource/password/new
# def new
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/users/passwords_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Users::PasswordsController < Devise::PasswordsController
after_action :try_to_authenticate_gestionnaire, only: %i(update)
after_action :try_to_authenticate_administrateur, only: %i(update)
after_action :try_to_authenticate_gestionnaire, only: [:update]
after_action :try_to_authenticate_administrateur, only: [:update]

# GET /resource/password/new
# def new
Expand Down
2 changes: 1 addition & 1 deletion app/models/attestation_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def used_tags
end

def logo_signature_file_size
%i[logo signature]
[:logo, :signature]
.select { |file_name| send(file_name).present? }
.each { |file_name| file_size_check(file_name) }
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/procedure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def clone(admin, from_library)
procedure.logo_secure_token = nil
procedure.remote_logo_url = self.logo_url

%i(notice deliberation).each { |attachment| clone_attachment(procedure, attachment) }
[:notice, :deliberation].each { |attachment| clone_attachment(procedure, attachment) }

procedure.administrateur = admin
procedure.initiated_mail = initiated_mail&.dup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace :'2017_12_04_translate_dossier_state_to_french' do
Dossier.unscoped.where(state: 'without_continuation').update_all(state: 'sans_suite')
end

task all: %i(brouillon en_construction en_instruction accepte refuse sans_suite) do
task all: [:brouillon, :en_construction, :en_instruction, :accepte, :refuse, :sans_suite] do
end

task revert: :environment do
Expand Down

0 comments on commit a80d6f1

Please sign in to comment.