Fix Style/MapToHash
cop (#34327)
This commit is contained in:
parent
33f3a4c4c8
commit
b4e56822c7
2 changed files with 2 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config --auto-gen-only-exclude --no-offense-counts --no-auto-gen-timestamp`
|
||||
# using RuboCop version 1.75.0.
|
||||
# using RuboCop version 1.75.1.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
|
@ -64,11 +64,6 @@ Style/HashTransformValues:
|
|||
- 'app/serializers/rest/web_push_subscription_serializer.rb'
|
||||
- 'app/services/import_service.rb'
|
||||
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Style/MapToHash:
|
||||
Exclude:
|
||||
- 'app/models/status.rb'
|
||||
|
||||
# Configuration parameters: AllowedMethods.
|
||||
# AllowedMethods: respond_to_missing?
|
||||
Style/OptionalBooleanParameter:
|
||||
|
|
|
@ -342,7 +342,7 @@ class Status < ApplicationRecord
|
|||
end
|
||||
|
||||
def bookmarks_map(status_ids, account_id)
|
||||
Bookmark.select(:status_id).where(status_id: status_ids).where(account_id: account_id).map { |f| [f.status_id, true] }.to_h
|
||||
Bookmark.select(:status_id).where(status_id: status_ids).where(account_id: account_id).to_h { |f| [f.status_id, true] }
|
||||
end
|
||||
|
||||
def reblogs_map(status_ids, account_id)
|
||||
|
|
Loading…
Add table
Reference in a new issue