demarches-normaliennes/app/views/users/dossiers/show/_estimated_delay.html.haml
Pierre de La Morinerie 54813db0ad dossiers: fix the cache not actually caching
As the expensive `procedure.usual_traitement_time` was called outside of
the cache, the cache was useless.
2019-04-30 15:56:27 +02:00

9 lines
624 B
Text

/ FIXME: remove the custom procedure switch at some point
- procedure_id_for_which_we_hide_the_estimated_delay = 6547
- procedure_path_for_which_we_hide_the_estimated_delay = 'deposer-une-offre-de-stage'
- show_time_means = procedure.id != procedure_id_for_which_we_hide_the_estimated_delay && procedure.path != procedure_path_for_which_we_hide_the_estimated_delay
- cache(procedure.id, expires_in: 1.day) do
- if procedure.usual_traitement_time && show_time_means
%p
Habituellement, les dossiers de cette démarche sont traités dans un délai de #{distance_of_time_in_words(procedure.usual_traitement_time)}.