In my bar.html, I present a partial view, and in it I want to call the foo (var1, var2) method and return an array. Everything works on my local system, but the following error occurs on my production system.
undefined local variable or method `foo' for #<#<Class:0x70c6410>:0x706f480>)
Can someone explain this to me?
KlasS # <#: 0x706f480> changes with each call, so it seems that the view is not trying to search for the function in my assistant.
EDIT:
The application has the following structure (example)
app/helpers/bar_helper
app/views/bar/bar.html.erb
app/views/bar/partials/bar_partial.html.erb
and in bar_partial.html.erb I call foo (var1, var2) in my bar_helper like this
<% data = foo(var1, var2) %>
source
share