Admin :: Post#new中的NoMethodError

时间:2014-03-22 16:00:12

标签: ruby-on-rails ruby-on-rails-4

我已使用 this tutorial 在单个文件中传输某些控制器。

Showing /home/action/NAME/app/views/admin/posts/_form.html.erb where line #1 raised:

undefined method `admin_posts_path' for #<#<Class:...

...

<%= form_for @post do |f| %>

路线档案:

scope module: 'admin' do
  resources :posts
end 

posts_controller.rb

def new
  @post = Admin::Post.new
end

0 个答案:

没有答案