From: Louise Rains on 9 Aug 2010 19:24 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 =>{:options => 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 -- Posted via http://www.ruby-forum.com/.
From: Louise Rains on 9 Aug 2010 19:57 Louise Rains wrote: > 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 =>{:options => > 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. -- Posted via http://www.ruby-forum.com/.
|
Pages: 1 Prev: Crunching Text Not Working in a Loop Next: Clipboard.set_data |