diff options
author | yhirano <yhirano@me.com> | 2017-05-01 23:31:02 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-01 16:31:02 +0200 |
commit | 3988f2dade8a75cb642db8c239097bfcf8943a0d (patch) | |
tree | 828473de646041adc8bbda73afec3ce3fcef3ae4 /app/models/account.rb | |
parent | 1899cf5f04400f8055e45ceda941a9580b93fa1e (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/models/account.rb')
-rw-r--r-- | app/models/account.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 798042b3b..03584b4e6 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -75,12 +75,12 @@ class Account < ApplicationRecord scope :by_domain_accounts, -> { group(:domain).select(:domain, 'COUNT(*) AS accounts_count').order('accounts_count desc') } delegate :email, - :current_sign_in_ip, - :current_sign_in_at, - :confirmed?, - to: :user, - prefix: true, - allow_nil: true + :current_sign_in_ip, + :current_sign_in_at, + :confirmed?, + to: :user, + prefix: true, + allow_nil: true def follow!(other_account) active_relationships.where(target_account: other_account).first_or_create!(target_account: other_account) @@ -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) |