如何将RefineryCMS中的root更改为博客?

时间:2013-09-04 23:16:35

标签: ruby-on-rails heroku refinerycms

在我config/routes.rb我有以下

Myapp::Application.routes.draw do

  # We ask that you don't use the :as option here, as Refinery relies on it being the default of "refinery"
  mount Refinery::Core::Engine, :at => '/'

  # You can have the root of your site routed with "root"
  # just remember to delete public/index.html.
  root :to => 'refinery/blog/posts#index'

  # See how all your routes lay out with "rake routes"

end   

我在终端中运行了rake routes。然后承诺并推动。然后运行heroku run rake routes但是当我加载应用程序时,它仍然加载主页作为根目录。

1 个答案:

答案 0 :(得分:2)

将您的路线放在Refinery的挂载点之前,因为Refinery有一个通配符路径,因此它可以处理404并且基本上是您的应用程序的支持。因此,一般来说,在每隔一条路线后安装炼油厂。