Optimised region filter, to minimise db requests
This commit is contained in:
parent
98e803899c
commit
1bdd9f434f
@ -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
|
||||
|
||||
- unless filter_region.region
|
||||
%ul
|
||||
= render partial: '/regions/filter_region',
|
||||
collection: filter_region.regions
|
||||
|
Loading…
Reference in New Issue
Block a user