From 67d62c40fd6aaa604d9725624786e69eecbb0d53 Mon Sep 17 00:00:00 2001 From: echarp Date: Mon, 22 Jan 2018 00:20:28 +0100 Subject: [PATCH] Trouble with hidden radio buttons --- app/views/regions/_filter.haml | 2 +- app/views/regions/_selector_region.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/regions/_filter.haml b/app/views/regions/_filter.haml index a4a10ce2..4667a6ad 100644 --- a/app/views/regions/_filter.haml +++ b/app/views/regions/_filter.haml @@ -1,4 +1,4 @@ -# Choose a region to filter events with %nav.region_filter %ul= render partial: '/regions/filter_region', - collection: Region.where(region: nil) + collection: Region.where(region: nil).includes(:regions) diff --git a/app/views/regions/_selector_region.haml b/app/views/regions/_selector_region.haml index b2de003f..c05da8ba 100644 --- a/app/views/regions/_selector_region.haml +++ b/app/views/regions/_selector_region.haml @@ -13,4 +13,4 @@ - if selector_region.regions.present? .radios = f.collection_radio_buttons :region_id, - Region.where(region: selector_region), :id, :name + Region.where(region: selector_region), :id, :name, include_hidden: false