我的haml:
= link_to("Calls Today", todo_path)
在我的路线上。rb:
match "todo/today" => "todo#show_date"
match "todo/today/campaign/:id" => "todo#show_date", :as => "todo"
我的理解是"todo_path"应该找到todo控制器和show_date。
此路由:
match "todo/today/campaign/:id" => "todo#show_date", :as => "todo"
应为id参数。因此,你的link_to应该是这样的:
= link_to("Calls Today", todo_path(:id => your_id))