about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authoryhirano <yhirano@me.com>2017-05-01 23:31:02 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-01 16:31:02 +0200
commit3988f2dade8a75cb642db8c239097bfcf8943a0d (patch)
tree828473de646041adc8bbda73afec3ce3fcef3ae4 /app/controllers
parent1899cf5f04400f8055e45ceda941a9580b93fa1e (diff)
Fix Rubocop offences (#2630)
* disable Bundler/OrderedGems

* fix rubocop Lint/UselessAssignment

* fix rubocop Style/BlockDelimiters

* fix rubocop Style/AlignHash

* fix rubocop Style/AlignParameters, Style/EachWithObject

* fix rubocop Style/SpaceInLambdaLiteral
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/auth/sessions_controller.rb2
-rw-r--r--app/controllers/concerns/localized.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/auth/sessions_controller.rb b/app/controllers/auth/sessions_controller.rb
index 09e67ec59..4a5e0da6e 100644
--- a/app/controllers/auth/sessions_controller.rb
+++ b/app/controllers/auth/sessions_controller.rb
@@ -51,7 +51,7 @@ class Auth::SessionsController < Devise::SessionsController
   def valid_otp_attempt?(user)
     user.validate_and_consume_otp!(user_params[:otp_attempt]) ||
       user.invalidate_otp_backup_code!(user_params[:otp_attempt])
-  rescue OpenSSL::Cipher::CipherError => error
+  rescue OpenSSL::Cipher::CipherError => _error
     false
   end
 
diff --git a/app/controllers/concerns/localized.rb b/app/controllers/concerns/localized.rb
index 44762df2a..5501b6793 100644
--- a/app/controllers/concerns/localized.rb
+++ b/app/controllers/concerns/localized.rb
@@ -17,9 +17,9 @@ module Localized
   end
 
   def default_locale
-    ENV.fetch('DEFAULT_LOCALE') {
+    ENV.fetch('DEFAULT_LOCALE') do
       user_supplied_locale || I18n.default_locale
-    }
+    end
   end
 
   def user_supplied_locale