From 3ae77ab3cdf27a740ffd7feb46b69455cd95bee8 Mon Sep 17 00:00:00 2001 From: Xinhui Date: Fri, 1 Dec 2017 17:20:05 +0100 Subject: Fix override page header title call multiple time, using flush option --- app/views/journey_patterns_collections/show.html.slim | 2 +- app/views/time_tables/show.html.slim | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/journey_patterns_collections/show.html.slim b/app/views/journey_patterns_collections/show.html.slim index 17a1f3770..834501da3 100644 --- a/app/views/journey_patterns_collections/show.html.slim +++ b/app/views/journey_patterns_collections/show.html.slim @@ -1,6 +1,6 @@ - breadcrumb :journey_patterns, @referential, @route - page_header_content_for @route -- content_for :page_header_title, t('journey_patterns.index.title', route: @route.name) +- content_for :page_header_title, t('journey_patterns.index.title', route: @route.name), flush: true - @journey_patterns.each do |jp| - jp.errors.each do |error_message| diff --git a/app/views/time_tables/show.html.slim b/app/views/time_tables/show.html.slim index 670d3256b..036581268 100644 --- a/app/views/time_tables/show.html.slim +++ b/app/views/time_tables/show.html.slim @@ -2,7 +2,8 @@ - breadcrumb :time_table, @referential, @time_table - page_header_content_for @time_table -- content_for :page_header_title, t('time_tables.show.title', name: @time_table.comment) +- content_for :page_header_title, t('time_tables.show.title', name: @time_table.comment), flush: true + - content_for :page_header_actions do - if policy(@time_table).edit? = link_to(t('actions.edit'), edit_referential_time_table_path(@referential, @time_table), class: 'btn btn-default') -- cgit v1.2.3