From 8c524e6c57939186e4f3c678af6e086329bd3639 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 27 May 2020 10:10:52 -0500 Subject: [PATCH] Add way to pass additional options to the campaign_locateable route helper --- config/routes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index c5cbf7dd..eb21a472 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -245,10 +245,10 @@ Rails.application.routes.draw do end end - direct :campaign_locateable do |model| + direct :campaign_locateable do |model, **opts| nonprofit = model.nonprofit {controller: 'campaigns', action: "show", state_code: nonprofit.state_code_slug, city: nonprofit.city_slug, name: nonprofit.slug, - campaign_slug: model.slug} + campaign_slug: model.slug}.merge(**opts) end direct :event_locateable do |model, **opts|