0

I have the following routes in Refinery:

$ rake routes | grep blog
                                 blog_root        /blog(.:format)                                                      refinery/blog/posts#index
                                 blog_post GET    /blog/posts/:id(.:format)                                            refinery/blog/posts#show
...

However, when I try to access that route, it gives an error.

 >   app.refinery.blog_post_path
ActionController::RoutingError: No route matches {:action=>"show", :controller=>"refinery/blog/posts"}

Here is part of routes.rb

  # Refinery
  mount Refinery::Core::Engine, at: '/'

Rails 3.2.14, Refinery 2.1.1.

4

1 回答 1

0

有两件事浮现在脑海

  1. 您可能不需要开头refinery.blog_post_pathapp尽管这似乎不是您的错误的根源。
  2. 更重要的是,您还没有指定要显示的博客文章。所以,你的代码应该看起来像refinery.blog_post_path my_blog_post.id
于 2014-03-21T10:18:11.373 回答