Hi All,
In app\views\home\Start.rhtml, the following code produces a list of customer links:
<td> <ul> <% @customers.each do |c| %> <li> <!-- < %= link_to_customer(c) % > --> <%= link_to(c.name, :controller => 'customer', :action => 'show', :id => c.id) %> </li> <% end %> </ul> </td>
But when I substitute:
<td> <%= render :partial => customer/list %> </td>
Rails complains: undefined local variable or method 'customer'
I've got app\views\customer\_list.rhtml defined as:
<ul> <% @customers.each do |c| %> <li> <%= link_to(c.name, :controller => 'customer', :action => 'show', :id => c.id) %> </li> <% end %> </ul>
I've got _form, edit, etc. .rhtml files defined in that folder, as well.
Can you tell why I can't get the partial template to work?
Incidentally, I tried to use a helper function link_to_customer(c) in the
code above, but I disabled it because I couldn't get that to work either.
But I'll save that issue for another day
Thanks in Advance, Richard