haml view can't find helper function

L

Louise Rains

I have an object called Survey. There is a haml file:
\views\surveys\index.html.haml.

The last line of the file is:

= render :partial => 'parameter_results', :locals =>{:eek:ptions =>
chart_options:)n, :age)

chart_options is in surveys_helper.rb. The error I'm getting is:

undefined method 'chart_options' for #<ActionView::Base:0x4603a28>

What gives? I thought the helper functions were always available to the
view. Or is there something wrong with my haml statement?

Thanks in advance.
LG
 
L

Louise Rains

Louise said:
I have an object called Survey. There is a haml file:
\views\surveys\index.html.haml.

The last line of the file is:

= render :partial => 'parameter_results', :locals =>{:eek:ptions =>
chart_options:)n, :age)}

chart_options is in surveys_helper.rb. The error I'm getting is:

undefined method 'chart_options' for #<ActionView::Base:0x4603a28>

What gives? I thought the helper functions were always available to the
view. Or is there something wrong with my haml statement?

Thanks in advance.
LG

There was a report function called by chart_options that was in the
helper. I moved it into the model and I'm now getting past that error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top