Ne prend pas en compte les tags sur les démarches en brouillon

This commit is contained in:
Kara Diaby 2023-01-23 15:32:43 +01:00
parent 49ce255e29
commit b18d76dff6

View file

@ -824,7 +824,7 @@ class Procedure < ApplicationRecord
def self.tags def self.tags
unnest = Arel::Nodes::NamedFunction.new('UNNEST', [self.arel_table[:tags]]) unnest = Arel::Nodes::NamedFunction.new('UNNEST', [self.arel_table[:tags]])
query = self.select(unnest.as('tags')).distinct.order('tags') query = self.select(unnest.as('tags')).publiees_ou_closes.distinct.order('tags')
self.connection.query(query.to_sql).flatten self.connection.query(query.to_sql).flatten
end end