Forum: Ruby on Rails Globalize plugin, now I have two classes with the same name

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6c8168208017c6451244516d7c1be9c5?d=identicon&s=25 Joshua Harvey (Guest)
on 2006-02-06 22:10
(Received via mailing list)
Estelle,

Are you doing an "include Globalize" somewhere? If you make sure that
that include doesn't appear in your code, then the Globalize Country
model shouldn't be imported into your namespace, i.e. it should work
like you want it to.

You will have to call the globalize classes as Globalize::Locale.set,
etc.

Best,
Josh
http://shnoo.gr
http://globalize-rails.org
#globalize IRC channel on freenode

Estelle wrote:

But currently Country.find is invoking the Globalize Country class
rather than my own.

Can someone explain how I can deal with this situation as cleanly as
possible?
0e5e8a4176061ad36e3e31311e28e309?d=identicon&s=25 Estelle Winterflood (Guest)
on 2006-02-06 23:36
(Received via mailing list)
Josh,

Thanks - yep I did have an "include Globalize" in my env file.  I'll
take it out.

I was also unsure about what to do with my own country table, but I
think I'll probably just rename it (or leave it), remove the duplicate
information and add a foreign key referencing the globalize_country
table.

The Globalize plugin is looking pretty fantastic.  Thanks for all your
hard work!

Regards,
Estelle.
This topic is locked and can not be replied to.