我在我的路線定義的資源文件,如下所示:的Rails 3.0成員路由問題
resources :accounts, :only => [:show, :new, :edit, :create, :update], :member => {
:profile_avatar => :get
}
反過來,我的賬戶#顯示視圖我有以下代碼:
<%= image_tag(profile_avatar_account_path(@account, :jpg), :alt => "#{@account.username}", :title => "#{@account.username}") %>
當拉起頁面我在我的生產日誌中出現以下錯誤:
ActionView::Template::Error (undefined method `profile_avatar_account_path' for #<#<Class:0x7f3fdb166260>:0x7f3fdb7bc4e8>):
是否rails 3.0不再支持成員或者是否存在差異這樣做的不同方式?
謝謝
布賴恩
這是一個很好的綜合,+1 :) – apneadiving
太棒了!這工作。謝謝。 – Brian