Strange error message in erb template

My erb template looks like this:

<% for f in @finders do %>   ...   <tr>   <%debugger%>   <%= emitActionLinks(f, edit_finder_path(f), f.owner != 0) %>   </tr> <% 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?

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: </tr> 29: <% end %> 30: </table>

The reason was inside emitActionLinks