Add event_locateable to routes

This commit is contained in:
Eric 2020-05-26 14:08:57 -05:00
parent 085be0c082
commit 1eb6a94936

View file

@ -251,6 +251,12 @@ Rails.application.routes.draw do
campaign_slug: model.slug} campaign_slug: model.slug}
end end
direct :event_locateable do |model, **opts|
nonprofit = model.nonprofit
{controller: '/events', action: "show", state_code: nonprofit.state_code_slug, city: nonprofit.city_slug, name: nonprofit.slug,
event_slug: model.slug}.merge(**opts)
end
# Misc # Misc
get '/pages/wp-plugin', to: redirect('/help/wordpress-plugin') # temporary, until WP plugin updated get '/pages/wp-plugin', to: redirect('/help/wordpress-plugin') # temporary, until WP plugin updated