% content_for :title, "Add a location to this scheme" %> <% content_for :before_content do %> <%= govuk_back_link( text: "Back", href: case params[:referrer] when "check_answers" scheme_location_check_answers_path(@scheme, @location, route: params[:route]) when "details" scheme_location_path(@scheme, @location) else scheme_location_postcode_path(@scheme, @location, route: params[:route]) end, ) %> <% end %> <%= form_for(@location, method: :patch, url: scheme_location_name_path(@scheme, @location, route: params[:route], referrer: params[:referrer])) do |f| %>