views:

38

answers:

1

Hi All,

I'm having a bit of a domain/scope issue when it comes to some plugins. Basically I'm using the OFC2 (http://pullmonkey.com/projects/open_flash_chart2/) for rails. However, I already have a class in use called Charts. I tried prepending a lot of my existing calls to Chart with "ActiveRecord::" but I'm not comfortable with this solution. Is there a quality mechanism by which to change the OpenFlash items without breaking them? Could I perhaps change its "Chart" to "Graph"?

Thoughts?

A: 

You can pull it in a Module, e.g.

Module Things
  class Charts
    #things
  end
end

and access it then e.g.

Things::Charts.new
Lichtamberg
Put which in a module? My code, or theirs? Both seem pretty well set, especially mine, given that it's an ActiveRecord class. I actually ended up going through the OFC code and changed all references of CHART to GRAPH. Everything *seems* to be working ok atm.
humble_coder
Since the plugin is hosted on github, perhaps you could fork it, put their code into a module (which helps everyone) and let them know so perhaps it makes it into a future version.
hopeless
I think your code is better to put in a module - if the plugin chances, your work gets lost..?
Lichtamberg