Forum: Ruby on Rails Problem with 1.1 and component...

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.
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-03-28 20:49
(Received via mailing list)
I have run into a problem with 1.1 that I just ran into. I have
component model thats in a namespace that references a regular model
thats not.

News::Event  #under componets/news/event.rb
...
belongs_to :state  #where state.rb is just under app/models

when I go to try and reference this I get an 'unitialized constant
State' error. My guess is that its looking for News::State instead of
just State. I tried adding :class_name => "State" to the relationship,
but that doesn't do anything.

Any suggestions? This was working before 1.1.

Thanks!
-Nick
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-03-28 20:57
(Received via mailing list)
One quick addtion, this seems to only be affecting my mailer class
model. All the other views seem to be working correctly. Odd....
11d27bae391fb2e05da65dcc09d28ba9?d=identicon&s=25 Kevin (Guest)
on 2006-03-28 22:05
(Received via mailing list)
Does Ticket#4431(http://dev.rubyonrails.org/ticket/4431) help you?
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-03-28 23:34
(Received via mailing list)
It might, looks similiar, I'll give it a try in a few.
This topic is locked and can not be replied to.