mab*_*sif 4 routing ruby-on-rails refinerycms
确保路由URL名称助手工作需要哪些基本设置?
例如,在我的路线中,我有以下内容:
Blog::Application.routes.draw do
resources :news, :as => :news_items, :controller => :news_items, :only => [:show, :index]
scope :module => "refinery" do
scope(:path => 'refinery', :as => 'admin', :module => 'Admin') do
resources :news, :except => :show, :as => :news_items, :controller => :news_items
end
end
end
Run Code Online (Sandbox Code Playgroud)
但以下似乎不起作用:
new_refinery_news_url
Run Code Online (Sandbox Code Playgroud)
我继续得到错误
未定义的局部变量或方法`new_refinery_news_url'
所以我很确定我的应用程序配置方式中缺少一些东西,主要路由是在Gemfile中添加的RefineryCMS gem中.
有什么想法吗?
| 归档时间: |
|
| 查看次数: |
5187 次 |
| 最近记录: |