diff options
author | Nick Schonning <nschonni@gmail.com> | 2023-02-18 17:09:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-19 07:09:40 +0900 |
commit | 2177daeae92b77be6797ba8f2ab6ebe1e641e078 (patch) | |
tree | 2cf004cd1611bd53f21cdb8021e98aa499448627 /app/presenters | |
parent | 167709f6b0731c163619c58afcb0ca11bb393e54 (diff) |
Autofix Rubocop Style/RedundantBegin (#23703)
Diffstat (limited to 'app/presenters')
-rw-r--r-- | app/presenters/tag_relationships_presenter.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/app/presenters/tag_relationships_presenter.rb b/app/presenters/tag_relationships_presenter.rb index c3bdbaf07..52e24314b 100644 --- a/app/presenters/tag_relationships_presenter.rb +++ b/app/presenters/tag_relationships_presenter.rb @@ -4,12 +4,10 @@ class TagRelationshipsPresenter attr_reader :following_map def initialize(tags, current_account_id = nil, **options) - @following_map = begin - if current_account_id.nil? - {} - else - TagFollow.select(:tag_id).where(tag_id: tags.map(&:id), account_id: current_account_id).each_with_object({}) { |f, h| h[f.tag_id] = true }.merge(options[:following_map] || {}) - end - end + @following_map = if current_account_id.nil? + {} + else + TagFollow.select(:tag_id).where(tag_id: tags.map(&:id), account_id: current_account_id).each_with_object({}) { |f, h| h[f.tag_id] = true }.merge(options[:following_map] || {}) + end end end |