Q:

unexpected kEND

  1 <p>
  2   <b>Name:</b>                                 
  3   <%=h @findlist.name %>                       
  4 </p>
  5 
  6 <p>
  7   <b>Cached slug:</b>                          
  8   <%=h @findlist.cached_slug %>                
  9 </p>
 10     
 11 <h4>Products</h4>                              
 12 <% @findlist.products.each do |product| %>    
 13 <p>
 14   <b>Product:</b>
 15   <%=h image_tag(product.photo.url) %>         
 16 </p>
 17 <% end %>                                     
 18                                                
 19 <%= link_to 'Edit', edit_user_findlist_path(@user, @findlist) %> |
 20 <%= link_to 'Back', findlists_path %>

I currently have the above code but it gives me the "unexpected kEND, expecting $end" at around line #12. I have been testing and testing the code and I can't see the syntax error. I am a ruby and rails newbie and I probably just couldn't see it.
Any help would be appreciated.
UPDATE: removing lines 12 to 17 removes the syntax error
Controller code:
  7   def show
  8     @findlist = @user.findlists.all
  9   end

I am using rails 2.3.11

A:

You get @findlists and traverse @findlist :) Is this really the error though ? Or a mistake on pasting code here ? Because i see that you use @findlist before each.
The error is from another file.- from comment

