0
我想用這種方法取記錄在Ruby on Rails的
@indivisuals = Profile.find_by_manager_id(current_user.account.id)
但是當我嘗試迭代它,它告訴我一些錯誤得到ROR一些領域的基礎上的紀錄。
undefined method each' for undefined method each' for #<Profile:0x8383680>
相關代碼:
<% if @indivisuals %>
<% @indivisuals.each do |profile| %>
<li><a href="accounts/show/<%=h profile.account_id %>" style="padding-left:10px;"><%=h profile.full_name %></a> <a href="accounts/edit/<%=h profile.account_id %>" style="padding-left:10px;">Edit</a> <a href="#" style="padding-left:10px;">Delete</a></li>
<% end %>
請讓我知道我做錯了。