counter variable not working?

Posted by jaycode on Stack Overflow See other posts from Stack Overflow or by jaycode
Published on 2010-06-18T14:30:19Z Indexed on 2010/06/18 14:33 UTC
Read the original article Hit count: 322

Just like many things in rails, sometimes it works, sometimes it doesn't...

Showing app/views/admin/products/_variant.html.erb where line #8  raised:

undefined local variable or method `variant_counter' for #<ActionView::Base:0x107f7ae10>

I only want to display variant_counter from partial _variant. This was the render caller code:

<%= render :partial => '/admin/products/variant', :collection => product.variants %>

The funny thing is, I have been using partial counter heaps number of times, somehow now I encountered this issue.

Could anybody point me out what are there to find out what may went wrong?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about partial-views