From 47dab285f38f784e162eedaaab2cf72e3cca653a Mon Sep 17 00:00:00 2001 From: JG Date: Tue, 21 Jun 2022 13:37:23 +0100 Subject: [PATCH] working flash --- app/controllers/schemes_controller.rb | 3 ++- app/views/schemes/check_answers.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/schemes_controller.rb b/app/controllers/schemes_controller.rb index 30c19bad1..39e4bdcc4 100644 --- a/app/controllers/schemes_controller.rb +++ b/app/controllers/schemes_controller.rb @@ -79,7 +79,8 @@ class SchemesController < ApplicationController end def update - flash[:notice] = I18n.t("Scheme has been created.") + @scheme = Scheme.find_by(id: params[:scheme_id]) + flash[:notice] = ("#{@scheme.service_name} has been created.") redirect_to schemes_path end diff --git a/app/views/schemes/check_answers.html.erb b/app/views/schemes/check_answers.html.erb index 317c7bbff..a56ee00b7 100644 --- a/app/views/schemes/check_answers.html.erb +++ b/app/views/schemes/check_answers.html.erb @@ -7,7 +7,7 @@ ) %> <% end %> -<%= govuk_tabs(title: 'Days of the week') do |component| %> +<%= govuk_tabs(title: "Check your answers before creating this scheme") do |component| %> <% component.tab(label: 'Scheme') do %> <%= govuk_summary_list do |summary_list| %> <% @scheme.display_attributes.each do |attr| %> @@ -20,4 +20,4 @@ <% end %> <% end %> -<%= govuk_button_link_to "Create scheme", scheme_update_path, html: { method: :put } %> +<%= govuk_button_link_to "Create scheme", scheme_update_path, html: { method: :get } %>