export cache_key based on column
This commit is contained in:
parent
954d232a47
commit
b5ed8c9b61
4 changed files with 20 additions and 12 deletions
|
@ -8,7 +8,10 @@ FactoryBot.define do
|
|||
groupe_instructeurs { [association(:groupe_instructeur)] }
|
||||
|
||||
after(:build) do |export, _evaluator|
|
||||
export.key = Export.generate_cache_key(export.groupe_instructeurs.map(&:id), export.procedure_presentation)
|
||||
procedure_presentation = export.procedure_presentation
|
||||
filters = Array.wrap(procedure_presentation&.filters_for(export.statut))
|
||||
sorted_column = procedure_presentation&.sorted_column
|
||||
export.key = Export.generate_cache_key(export.groupe_instructeurs.map(&:id), filters, sorted_column)
|
||||
export.user_profile = export.groupe_instructeurs.first&.instructeurs&.first if export.user_profile.nil?
|
||||
export.dossiers_count = 10 if !export.pending?
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue