문제

In my config/routes.rb I have the following

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   

I ran rake routes in the terminal. Then committed and pushed. Then ran heroku run rake routes but when I load the app, it still loads loads the home page as the root.

도움이 되었습니까?

해결책

Put your route before Refinery's mount point because Refinery has a wildcard route so that it can handle 404s and basically be the backstop for your application. So, in general, mount Refinery after every other route.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top