Remove *_names accessors for bucket views
This commit is contained in:
@@ -6,10 +6,6 @@ module Bucket::View::Assignees
|
||||
end
|
||||
|
||||
private
|
||||
def assignee_names
|
||||
assignees.map &:name
|
||||
end
|
||||
|
||||
def assignees
|
||||
@assignees ||= account.users.where id: assignee_ids
|
||||
end
|
||||
|
||||
@@ -15,10 +15,10 @@ module Bucket::View::Summarized
|
||||
end
|
||||
|
||||
def assignee_summary
|
||||
"assigned to <mark>#{assignee_names.to_choice_sentence}</mark>" if assignee_names.any?
|
||||
"assigned to <mark>#{assignees.map(&:name).to_choice_sentence}</mark>" if assignees.any?
|
||||
end
|
||||
|
||||
def tag_summary
|
||||
"tagged <mark>#{tag_names.to_choice_sentence}</mark>" if tag_names.any?
|
||||
"tagged <mark>#{tags.map(&:hashtag).to_choice_sentence}</mark>" if tags.any?
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,10 +6,6 @@ module Bucket::View::Tags
|
||||
end
|
||||
|
||||
private
|
||||
def tag_names
|
||||
tags.map &:hashtag
|
||||
end
|
||||
|
||||
def tags
|
||||
@tags ||= account.tags.where id: tag_ids
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user