Add way to pass additional options to the campaign_locateable route helper
This commit is contained in:
		
							parent
							
								
									1eb6a94936
								
							
						
					
					
						commit
						8c524e6c57
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -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| | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Eric
						Eric