adds filtering of tags for spending proposals

This commit is contained in:
rgarcia
2016-03-08 13:57:58 +01:00
parent 837ad5fb1b
commit cd8cbef389
8 changed files with 46 additions and 2 deletions

View File

@@ -38,6 +38,10 @@ module ActsAsTaggableOn
Tag.where("kind = 'category'").pluck(:name)
end
def self.spending_proposal_tags
ActsAsTaggableOn::Tag.where('taggings.taggable_type' => 'SpendingProposal').includes(:taggings).uniq
end
private
def custom_counter_field_name_for(taggable_type)
"#{taggable_type.underscore.pluralize}_count"

View File

@@ -150,6 +150,7 @@ en:
index:
geozone_filter_all: All zones
administrator_filter_all: All administrators
tags_filter_all: All tags
filters:
valuation_open: Open
without_admin: Without assigned admin

View File

@@ -150,6 +150,7 @@ es:
index:
geozone_filter_all: Todos los ámbitos de actuación
administrator_filter_all: Todos los administradores
tags_filter_all: Todas las etiquetas
filters:
valuation_open: Abiertas
without_admin: Sin administrador asignado