Browse Source

refactor: erblinting

pull/1034/head
natdeanlewissoftwire 4 years ago
parent
commit
aed2dc7c85
  1. 2
      app/views/locations/mobility_standards.html.erb
  2. 8
      app/views/locations/name.html.erb
  3. 2
      app/views/locations/postcode.html.erb
  4. 2
      app/views/locations/type_of_unit.html.erb
  5. 2
      app/views/locations/units.html.erb

2
app/views/locations/mobility_standards.html.erb

@ -4,7 +4,7 @@
<%= govuk_back_link(
text: "Back",
href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location) : scheme_location_type_of_unit_path(@scheme, @location),
) %>
) %>
<% end %>
<%= form_for(@location, method: :patch, url: scheme_location_mobility_standards_path(@scheme, @location, referrer: params[:referrer])) do |f| %>

8
app/views/locations/name.html.erb

@ -3,8 +3,12 @@
<% content_for :before_content do %>
<%= govuk_back_link(
text: "Back",
href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location) : params[:referrer] == "details" ? scheme_location_path(@scheme, @location) : scheme_location_postcode_path(@scheme, @location),
) %>
href: if params[:referrer] == "check_answers"
scheme_location_check_answers_path(@scheme, @location)
else
params[:referrer] == "details" ? scheme_location_path(@scheme, @location) : scheme_location_postcode_path(@scheme, @location)
end,
) %>
<% end %>
<%= form_for(@location, method: :patch, url: scheme_location_name_path(@scheme, @location, referrer: params[:referrer])) do |f| %>

2
app/views/locations/postcode.html.erb

@ -4,7 +4,7 @@
<%= govuk_back_link(
text: "Back",
href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location) : scheme_locations_path(@scheme),
) %>
) %>
<% end %>
<%= form_for(@location, method: :patch, url: scheme_location_postcode_path(@scheme, @location, referrer: params[:referrer])) do |f| %>

2
app/views/locations/type_of_unit.html.erb

@ -4,7 +4,7 @@
<%= govuk_back_link(
text: "Back",
href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location) : scheme_location_units_path(@scheme, @location),
) %>
) %>
<% end %>
<%= form_for(@location, method: :patch, url: scheme_location_type_of_unit_path(@scheme, @location, referrer: params[:referrer])) do |f| %>

2
app/views/locations/units.html.erb

@ -4,7 +4,7 @@
<%= govuk_back_link(
text: "Back",
href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location) : scheme_location_name_path(@scheme, @location),
) %>
) %>
<% end %>
<%= form_for(@location, method: :patch, url: scheme_location_units_path(@scheme, @location, referrer: params[:referrer])) do |f| %>

Loading…
Cancel
Save