Browse Source

specs

pull/1785/head
Kat 3 years ago
parent
commit
cfa885251c
  1. 3
      app/controllers/sessions_controller.rb
  2. 2
      app/views/locations/_location_filters.html.erb

3
app/controllers/sessions_controller.rb

@ -1,8 +1,9 @@
class SessionsController < ApplicationController
def clear_filters
session[session_name_for(params[:filter_type])] = "{}"
path_params = params[:path_params].presence || {}
redirect_to send("#{params[:filter_type]}_path", scheme_id: params[:path_params][:scheme_id])
redirect_to send("#{params[:filter_type]}_path", scheme_id: path_params[:scheme_id])
end
private

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

@ -5,7 +5,7 @@
</div>
<div class="app-filter__content">
<%= form_with html: { method: :get } do |f| %>
<%= form_with url: scheme_locations_path(@scheme), html: { method: :get } do |f| %>
<div class="govuk-grid-row" style="white-space: nowrap">
<p class="govuk-grid-column-one-half">
<%= filters_applied_text(@filter_type) %>

Loading…
Cancel
Save