Add way to pass additional options to the campaign_locateable route helper

This commit is contained in:
Eric 2020-05-27 10:10:52 -05:00
parent 1eb6a94936
commit 8c524e6c57

View file

@ -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|