Order tags to search by alphabetically
We were ordering one group of tags alphabetically and then adding another group of tags which wasn't ordered alphabetically, which didn't make much sense.
This commit is contained in:
@@ -54,9 +54,10 @@ module BudgetsHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def investment_tags_select_options(budget, context)
|
def investment_tags_select_options(budget, context)
|
||||||
tags = budget.investments.tags_on(context).order(:name).pluck(:name)
|
taggables = [budget] + budget.investments
|
||||||
tags = tags.concat budget.tag_list_on(context)
|
Tag.joins(:taggings)
|
||||||
tags.uniq
|
.merge(Tagging.where(taggable: taggables, context: context))
|
||||||
|
.distinct.order(:name).pluck(:name)
|
||||||
end
|
end
|
||||||
|
|
||||||
def unfeasible_or_unselected_filter
|
def unfeasible_or_unselected_filter
|
||||||
|
|||||||
Reference in New Issue
Block a user