2013-05-02 99 views
0

我得到这个错误未定义的局部变量或方法`browse_path”

NameError in Browse#index 
undefined local variable or method `browse_path' 

这里就是引发错误

<li><%= link_to "Browse", browse_path %></li> 

这里的控制器

class BrowseController < ApplicationController 

def index 
    @tags = tag.find(:all, :order => 'created_at DESC') 
end 
end 
鉴于码

最后我的路线

get'/browse' => 'browse#index', :as => :index 

有人知道这是什么原因造成的?

+0

如果不确定路径助手名称是什么,请在终端中运行“rake routes”,它会告诉你。 – hlh 2013-05-02 22:46:17

回答

相关问题