Hookup to partial template fails - Why?

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 :slight_smile:

Thanks in Advance, Richard

Hi Terry and Nathan,


That did it!! I spent a day trying to figure out the cause of my problem. You guys solved it in an instant!

Thank you very much.

Regards, Richard

"Richard Lionheart" <RichardDummyMailbox58407@USComputerGurus.com> wrote in message news:ee4qe2$drn$1@sea.gmane.org...