2
如何獲得指定路線的路徑助手?紅寶石軌道如何獲得指定路線的路徑
的routes.rb
match 'report/monitor_id/:monitor_id/week_ending_date/:week_ending_date' => 'report#index'
如何獲得命名的路由路徑幫手?當我做耙路線,沒有什麼前
/report/monitor_id/:monitor_id/week_ending_date/:week_ending_date(.:format) report#index
有沒有辦法讓report_monitor_id_week_ending_date_path(monitor_id,week_ending_date)?
的:這將是擺在url;例如http:// localhost:3000/weekly_monitor_report而不是http:// localhost:3000/report/monitor_id/xxx/week_ending_date/yyy。 看起來我可以使用嵌套資源 ** ** route.rb '資源:報告做 資源:monitor_ids做 資源:week_ending_dates做 資源:報告 結束 結束 結束 ' – user2371769