rubocop: fix various Rubocop warnings.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
class PostPresenter
|
||||
attr_reader :pool, :next_post_in_pool
|
||||
|
||||
delegate :split_tag_list_text, to: :tag_set_presenter
|
||||
|
||||
def initialize(post)
|
||||
|
||||
@@ -55,7 +55,7 @@ class TagSetPresenter
|
||||
end
|
||||
|
||||
def ordered_tags
|
||||
names_to_tags = tags.map { |tag| [tag.name, tag] }.to_h
|
||||
names_to_tags = tags.index_by(&:name)
|
||||
|
||||
tag_names.map do |name|
|
||||
names_to_tags[name] || Tag.new(name: name).freeze
|
||||
|
||||
Reference in New Issue
Block a user