In my routes.rb I have:
get "projects/:category_id" => "projects#index"
When I write projects_path(1) the generated URL is /projects.1 instead of /projects/1. Do you know why this is happening? Here is the output of rake routes:
projects_path(1)
/projects.1
/projects/1
rake routes
GET /projects/:category_id(.:format) projects#index
projects_path is the index, which only takes one argument: the format. You want project_path(1)
projects_path
project_path(1)
1.4m articles
1.4m replys
5 comments
57.0k users