Strange error message in erb template

My erb template looks like this:

<% for f in @finders do %>

<%debugger%> <%= emitActionLinks(f, edit_finder_path(f), f.owner != 0) %> <% end %>

emitActionLinks is defined in application_helper.rb and returns a string
of HTML.

At the debugger loction, I can inspect the parameters of
emitActionLinks, but if it gets executed, this error message pops up:

undefined local variable or method `f’ for
#ActionView::Base:0x7f6d514eca80

Why?

On 20 August 2010 10:42, Fritz T. [email protected] wrote:

emitActionLinks is defined in application_helper.rb and returns a string
of HTML.

At the debugger loction, I can inspect the parameters of
emitActionLinks, but if it gets executed, this error message pops up:

undefined local variable or method `f’ for
#ActionView::Base:0x7f6d514eca80

Can you post the whole error trace please?

Colin

I got it: Its a misleading error location message:

Showing app/views/finders/index.html.erb where line #27 raised:

undefined local variable or method `f’ for
#ActionView::Base:0x7f6d514eca80

Extracted source (around line #27):

25:
26: <%debugger%>
27: <%= emitActionLinks(f, edit_finder_path(f), f.owner != 0) %>
28:
29: <% end %>
30:

The reason was inside emitActionLinks