1
我得到加载页面时,此路由错误:路由错误当路由存在
ActionController::RoutingError in Videos#index
Showing /rubyprograms/dreamstill/app/views/layouts/application.html.erb where line #26 raised:
No route matches {:action=>"show", :controller=>"profiles"}
它指的是这一行:
<%= link_to "Profile", profile_path(current_user.profile), :class => 'normal' %>
然而,路线的存在是因为我有这我的路线:
resources :profiles do
get 'activity', :on => :member
get 'shown_songs', :on => :member
end
,我有我的配置文件控制这个动作:
def show
@profile = Profile.find(params[:id])
end
这是怎么回事,我该如何解决这个问题?