controller
This commit is contained in:
parent
b81c36c6b8
commit
04b86e9c55
1 changed files with 1 additions and 0 deletions
|
@ -369,6 +369,7 @@ module Administrateurs
|
|||
procedures_result = Procedure.select(:id).joins(:procedures_zones).distinct.publiees_ou_closes
|
||||
procedures_result = procedures_result.where(procedures_zones: { zone_id: filter.zone_ids }) if filter.zone_ids.present?
|
||||
procedures_result = procedures_result.where(aasm_state: filter.statuses) if filter.statuses.present?
|
||||
procedures_result = procedures_result.where("? = ANY(tags)", filter.tag) if filter.tag.present?
|
||||
procedures_result = procedures_result.where('published_at >= ?', filter.from_publication_date) if filter.from_publication_date.present?
|
||||
procedures_result = procedures_result.where('unaccent(libelle) ILIKE unaccent(?)', "%#{filter.libelle}%") if filter.libelle.present?
|
||||
procedures_sql = procedures_result.to_sql
|
||||
|
|
Loading…
Reference in a new issue