rubyonrailsin

A Ruby and Rails talk

Wednesday, March 31, 2010


[Rails] unitialized constant

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

I installed this plugin http://github.com/loudpixel/highcharts-rails
and I put this code in my controller:

def panels
@ui_panels = Highchart.pie({
:chart => {
:renderTo => "pie-chart-container",
:margin => [50, 30, 0, 30]
},
:credits => {
:enabled => true,
:href => 'http://marketshare.hitslink.com/browser
px?qprid=3',
:text => 'Data provided by NETMARKETSHARE'
},
:plotOptions => {
:pie => {
:dataLabels => {
:formatter => pie_label_formatter,
:style => {
:textShadow => '#000000 1px 1px 2px'
}
}
}
},
:series => [
{
:type => 'pie',
:data => browser_data
}
],
:subtitle => {
:text => 'January 2010'
},
:title => {
:text => 'Browser Market Share'
},
:tooltip => {
:formatter => pie_tooltip_formatter
},
})

end

Yet, I get this error:
NameError in DashboardController#panels

uninitialized constant DashboardController::Highchart

Any suggestions? thanks.
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive