Organisations with no tags do not disturb the form anymore
This commit is contained in:
parent
f2105006ef
commit
9c55f58254
@ -36,7 +36,7 @@ class TagsController < InheritedResources::Base
|
||||
|
||||
# Splits, groups, rejects the less used
|
||||
def organise_tags(tags)
|
||||
tags.pluck(:tags).map(&:split).flatten
|
||||
tags.where.not(tags: '').pluck(:tags).map(&:split).flatten
|
||||
.group_by { |i| i }
|
||||
.map { |k, v| [k, v.size] }
|
||||
.reject { |_k, v| v <= 3 }
|
||||
|
Loading…
Reference in New Issue
Block a user