我有以下路线:
match "sports/:sport(/:view)" => 'sports#show', as:'sport_path'
我怎么打电话sport_path(sport, view)
?当我尝试:
sport_path(params[:sport], 1)
结果网址是:/sports/5.1
. 应该是/sports/5/1
(注意点而不是斜线)
我有以下路线:
match "sports/:sport(/:view)" => 'sports#show', as:'sport_path'
我怎么打电话sport_path(sport, view)
?当我尝试:
sport_path(params[:sport], 1)
结果网址是:/sports/5.1
. 应该是/sports/5/1
(注意点而不是斜线)