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
th-downstream
yhirano 8 years ago committed by Eugen Rochko
parent 9f6363a319
commit 18e4933432

@ -77,6 +77,9 @@ Style/Lambda:
Rails/HasAndBelongsToMany:
Enabled: false
Bundler/OrderedGems:
Enabled: false
AllCops:
TargetRubyVersion: 2.3
Exclude:

@ -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

@ -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

@ -329,7 +329,7 @@ class Account < ApplicationRecord
private
def follow_mapping(query, field)
query.pluck(field).inject({}) { |mapping, id| mapping[id] = true; mapping }
query.pluck(field).each_with_object({}) { |id, mapping| mapping[id] = true }
end
def avatar_styles(file)

Loading…
Cancel
Save