Forum: Ruby on Rails Newbie question: How to reference models in subdirectories

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.
Juergen Barth (Guest)
on 2006-04-01 17:43
Hi, new to RoR I am probably going to embarrass myself now:

I have models organised in subdirectories, i.e.


When I try to reference another model within the same subdirectory,
everything works fine, i.e.

belongs_to :product_categories, :class_name =>

However, when I reference a model in a different subdirectory, I get an
uninitialized constant error, i.e.

belongs_to :currencies, :class_name => 'CrossApplications::Currency'
`const_missing': uninitialized constant 'CrossApplications'

What am I doing wrong here?
Thanks in advance for patience and a helpful answer!
This topic is locked and can not be replied to.