Browse Source

working flash

pull/671/head
JG 3 years ago
parent
commit
47dab285f3
  1. 3
      app/controllers/schemes_controller.rb
  2. 4
      app/views/schemes/check_answers.html.erb

3
app/controllers/schemes_controller.rb

@ -79,7 +79,8 @@ class SchemesController < ApplicationController
end end
def update 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 redirect_to schemes_path
end end

4
app/views/schemes/check_answers.html.erb

@ -7,7 +7,7 @@
) %> ) %>
<% end %> <% 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 %> <% component.tab(label: 'Scheme') do %>
<%= govuk_summary_list do |summary_list| %> <%= govuk_summary_list do |summary_list| %>
<% @scheme.display_attributes.each do |attr| %> <% @scheme.display_attributes.each do |attr| %>
@ -20,4 +20,4 @@
<% end %> <% end %>
<% 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 } %>

Loading…
Cancel
Save