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