Hi,
I have such a route:
get 'projects/:project_id/files/list*path' => "files#list", format: false, as: :files_list
I want to generate it using files_list_path(@project), but when I use it I get:
No route matches {:controller=>"files", :action=>"list", :project_id=>#<Project _id: 4e3b137a3a5c9f7027000002>}
The solution I found is to create another normal route:
get 'projects/:project_id/files/list*path' => "files#list", format: false get 'projects/:project_id/files/list' => "files#list", as: :files_list
This way files_list_path(@project) generates '/projects/some_id/files/ list' and '/projects/some_id/files/list/something' is also matched by the first route. But honestly it doesn't seem right to me. Is this necessary? Am I missing something?
Regards, Juliusz Gonera