Topic: OpenFlashChart 2 - putting the open_flash_chart_object in the view
Hi
I'm putting together charts with the (amazing) OpenFlashChart plugin (http://pullmonkey.com/2008/7/23/open-fl rails-ofc2).
It is working great - except that I need to generate the open_flash_chart_object from a partial instead of in the controller so that I can pass on a few variables to the chart. My app complained that the method wasn't available in the view, so I hacked the plugin init.rb to put all of the Controller Methods into the view as well:
ActionView::Base.send :include, OpenFlashChart::Controller
I'm sure there is a proper way to call this method from the view without putting all of the controller methods in the view. I couldn't find the proper way to do this on the site or in the documentation - anyone else solve this "legitimately"?
Thanks in advance.
mp