Namespace pollution?

Hi all -

I’m having a problem where I have a model named City and I my
application also calls a web service that encaspulates an object named
City (I’m using wsdl2ruby to generate the classes). I can wrap this
web service City class in a module like this:

module WebServiceModule
class City

but when I run my code in Rails, I get a superclass mismatch error
when I include the module. I’m not sure what’s going on actually
because similar code in plain old Ruby doesn’t exhibit this behavior.
Does Rails somehow put everything into some sort of flattened

Any help would be appreciated as we model a lot of common types such
as StateProvince, Country, etc that many of our suppliers also model
using the same names and I need to namespace them using Modules (at
least that’s how I think they should be namespaced - open to other
ideas though!).



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs