Browse Source

Optimised region filter, to minimise db requests

remotes/origin/master
echarp 3 years ago
parent
commit
1bdd9f434f
  1. 9
      app/views/regions/_filter_region.haml

9
app/views/regions/_filter_region.haml

@ -18,10 +18,11 @@
= filter_region.name
- if session[:region] == filter_region.id
%em.fa.fa-times
- elsif filter_region.regions.present?
- elsif !filter_region.region && filter_region.regions.present?
%small
%em.fa.fa-chevron-down
%ul
= render partial: '/regions/filter_region',
collection: filter_region.regions
- unless filter_region.region
%ul
= render partial: '/regions/filter_region',
collection: filter_region.regions

Loading…
Cancel
Save