add filters for
This commit is contained in:
parent
3d79c6176e
commit
0abee08329
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,12 @@ class ProcedurePresentation < ApplicationRecord
|
|||
attribute :expirant_filters, :jsonb, array: true
|
||||
attribute :archives_filters, :jsonb, array: true
|
||||
|
||||
def filters_for(statut)
|
||||
send(filters_name_for(statut))
|
||||
end
|
||||
|
||||
def filters_name_for(statut) = statut.tr('-', '_').then { "#{_1}_filters" }
|
||||
|
||||
def displayed_fields_for_headers
|
||||
[
|
||||
Column.new(procedure_id: procedure.id, table: 'self', column: 'id', classname: 'number-col'),
|
||||
|
|
Loading…
Reference in a new issue