Modify URL Pattern Ruby Rails
问题 I am trying to display a page to show all products by current user. Because of this, I have created a new page showall.html.erb under products view. I have done the following: ProductsController def showall @products = current_user.products end routes resources :products do get :showall end I am aware that because of the nested resources the URL Pattern became /products/:product_id/showall(.:format) How do I actually get rid of the product_id part to achieve /products/showall to have one