0

I have the following route:

match "sports/:sport(/:view)" => 'sports#show', as:'sport_path'

How do I call sport_path(sport, view)? When I try:

sport_path(params[:sport], 1)

The resulting url is: /sports/5.1. It should be /sports/5/1 (notice the dot instead of the slash)

Tyler DeWitt
  • 23,366
  • 38
  • 119
  • 196

1 Answers1

1

I had another route named sport. face-palm

Tyler DeWitt
  • 23,366
  • 38
  • 119
  • 196