Forum: Ruby on Rails Rails model naming conflict

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
9a5c497293dffb91cacef202bad5b602?d=identicon&s=25 Jason (Guest)
on 2007-01-16 04:00

I have a problem with my Rails app re:namespaces. I have a model called
'Document' (name cannot be changed) which conflicts with the
REXML::Document ojbect.

Anyone know of a way to get around this. I have quite a bit of code that
uses my 'Document' model and it would be a real pain for me to go back
and re-edit/re-do stuff.

I'm hoping there's something I can do in my code on the REXML::Document
declarations, but I'm not sure what that would be yet. Any suggestions
would be appreciated. tia

- jason
58c44a4a506d878f9a112f1d7b7cb87e?d=identicon&s=25 Jeremy Evans (Guest)
on 2007-01-16 17:48
(Received via mailing list)
On 1/15/07, Jason <> wrote:
> would be appreciated. tia
You should be able to reference your model as ::Document.  As long as
you don't "include REXML", that should work fine.
This topic is locked and can not be replied to.