I've got an ActiveRecord::Base class named Tracker. I've also got an ActiveResource class named MyConfig that will read an xml file that looks like:
<my-config> <tracker> <name>foo</name> </tracker> </my-config>
class MyConfig < ActiveResource::Base self.site = "http://localhost" end
If I do MyConfig.find(1), I get:
NoMethodError: undefined method `name=' for #<Tracker:0x2487378>
ARes apparently creates new classes for all these sub-elements, and it does them in the MyConfig context (so it should make MyConfig::Tracker). If I type MyConfig::Tracker into the console, I get
MyConfig::Tracker
(irb):13: warning: toplevel constant Tracker referenced by MyConfig::Tracker => Tracker
Why is it doing this? And how do I fix it? I need to keep my Tracker ActiveRecord class, and the xml file has to have the <tracker> element.
Pat