From 78232fabf856c67ad58cf6f369452a6ffa1bddd6 Mon Sep 17 00:00:00 2001 From: Jose Farias Date: Thu, 24 Oct 2024 18:15:23 -0600 Subject: [PATCH] map -> pluck --- app/models/bucket/view/summarized.rb | 2 +- app/views/events/actions/_assigned.html.erb | 2 +- app/views/tags/index.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/bucket/view/summarized.rb b/app/models/bucket/view/summarized.rb index 955c11824..46cdf70e3 100644 --- a/app/models/bucket/view/summarized.rb +++ b/app/models/bucket/view/summarized.rb @@ -15,7 +15,7 @@ module Bucket::View::Summarized end def assignee_summary - "assigned to #{assignees.map(&:name).to_choice_sentence}" if assignees.any? + "assigned to #{assignees.pluck(:name).to_choice_sentence}" if assignees.any? end def tag_summary diff --git a/app/views/events/actions/_assigned.html.erb b/app/views/events/actions/_assigned.html.erb index d66ed518b..b59d59a3e 100644 --- a/app/views/events/actions/_assigned.html.erb +++ b/app/views/events/actions/_assigned.html.erb @@ -1 +1 @@ -Assigned to <%= event.assignees.map(&:name).to_sentence %> <%= time_ago_in_words(event.created_at) %> ago. +Assigned to <%= event.assignees.pluck(:name).to_sentence %> <%= time_ago_in_words(event.created_at) %> ago. diff --git a/app/views/tags/index.html.erb b/app/views/tags/index.html.erb index 523c269cf..13dbde439 100644 --- a/app/views/tags/index.html.erb +++ b/app/views/tags/index.html.erb @@ -8,7 +8,7 @@ - <%= tag.bubbles.map(&:title).to_sentence %> + <%= tag.bubbles.pluck(:title).to_sentence %> <%= button_to tag_path(tag), class: "btn txt-small", method: :delete, data: { turbo_confirm: "Are you sure?" } do %>