我刚刚升级到1.0.3
,并且我的 config/routes 文件夹中的 routes.rb 文件似乎忽略了我所有的自定义路由。
我的路线.rb
JollyStore::Application.routes.draw do
# Mount Spree's routes
mount Spree::Core::Engine, :at => '/'
root :to => 'pages#index'
namespace :admin do
resources :wysiwygs
end
match 'about_us/', :to => "pages#about_us"
match 'services/', :to => "pages#services"
match 'raw_resources/', :to => "pages#raw_resources"
match 'contact_us/', :to => "pages#contact_us"
match 'privacy_policy/', :to => "pages#privacy_policy"
match 'return_policy/', :to => "pages#return_policy"
match 'refund_policy/', :to => "pages#refund_policy"
match 'cancellation_policy/', :to => "pages#cancellation_policy"
match 'delivery_shipping_policy/', :to => "pages#delivery_shipping_policy"
end
如果我运行bundle exec rake routes
,它会返回所有适当的路线。但是当我尝试访问该特定页面时,我得到:
undefined local variable or method `about_us_path'
或者我的自定义路由中的每个链接都出现相同的错误。不知何故,我的路线被忽略了。有谁知道绕过这个问题的方法?