我遇到路由问题。我有一个指向“new_company_path”的链接,但在网站上它链接到“site / dashboard”。当我执行“rake路线”时,它为链接提供了正确的路线:
new_company GET /companies/new(.:format) {:action=>"new", :controller=>"companies"}
这是我的“routes.rb”:
match "/companies/:id/users" => "site#company_users", :as => :company_users
match "/company/:id/companies_user/new" => "companies_users#new"
resources :companies
get "site/index"
get "site/features"
get "site/dashboard", :as => "dashboard"
get "users_dashboard/show", :as => "users_dashboard"
get "login" => "sessions#new", :as => "login"
get "logout" => "sessions#destroy", :as => "logout"
链接不正确的原因是什么?