I instructed config/routes.rb to use Refinery Blog as a root directory:
root :to => "refinery/blog/posts#index"
mount Refinery::Core::Engine, :at => '/'
In a app/view/layouts/_header.html.slim I'm trying to use blog_root
route. For example:
= link_to (image_tag "/logo.gif"), blog_root, class: "brand"
The route is listed when I issue rake routes
:
blog_root /blog(.:format) refinery/blog/posts#index
But nothing shows up, the system gives an error:
undefined local variable or method `blog_root' for
#<#<Class:0x00000005e62f80>:0x007fd7241d94c8>
Also, I tryed blog_root_path
, but it didn't work either.
Anything I can do in this situation? Thanks a lot!