Hookup to partial template fails - Why?

Hi All,

In app\views\home\Start.rhtml, the following code produces a list of
customer links:

    <% @customers.each do |c| %>
  • <%= link_to(c.name, :controller => 'customer', :action => 'show', :id => c.id) %>
  • <% end %>

But when I substitute:

<%= render :partial => customer/list %>

Rails complains:
undefined local variable or method ‘customer’

I’ve got app\views\customer_list.rhtml defined as:

    <% @customers.each do |c| %>
  • <%= link_to(c.name, :controller => 'customer', :action => 'show', :id => c.id) %>
  • <% end %>

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

Env.: WinXP-Pro/SP2, MS VisualStudio.NET Eclipse 3.1.2
Ruby 1.8.2-15 Rails 1.1.4 Java JDK 1.5.0_06

You have:

<%= render :partial => customer/list %>

I think you need:

<%= render :partial => “customer/list” %>

Terry

On 9/11/06, Richard L.
[email protected]
wrote:

<li>
Richard --- Env.: WinXP-Pro/SP2, MS VisualStudio.NET Eclipse 3.1.2 Ruby 1.8.2-15 Rails 1.1.4 Java JDK 1.5.0_06


Terry (TAD) Donaghe
http://www.tadspot.com

Hi Terry and Nathan,

‘customer/list’

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 L.”
[email protected]
wrote in message news:[email protected]