I have a Model called UserPrice and when I make the show route match this:
match "/:id/:product_name/:purchase_date/:price", :to => "user_prices#show"
It generates no new route path to use nor does it change it in the view. Why doesn’t it do this? How would I get it to do this?
You should use the
as => [name]syntax:will create
show_pathandshow_url(see http://guides.rubyonrails.org/routing.html#naming-routes)