# Problem with 1.1 and component

**URL:** <https://www.ruby-forum.com/t/problem-with-1-1-and-component/56189>\
**Category:** Rails\
**Created:** [March 28, 2006, 8:49pm UTC](https://www.ruby-forum.com/t/problem-with-1-1-and-component/56189 "2006-03-28T20:49:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicksnels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/aca169/32.png) [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Post date:** [March 28, 2006, 8:49pm UTC](https://www.ruby-forum.com/t/problem-with-1-1-and-component/56189/1 "2006-03-28T20:49:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nicksnels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/aca169/32.png) [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Post date:** [March 28, 2006, 10:05pm UTC](https://www.ruby-forum.com/t/problem-with-1-1-and-component/56189/2 "2006-03-28T22:05:47Z")

</div>

Does Ticket#4431([http://dev.rubyonrails.org/ticket/4431](http://dev.rubyonrails.org/ticket/4431)) help you?

---

<div class="post-metadata">

**Author:** ![nicksnels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/aca169/32.png) [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Post date:** [March 28, 2006, 8:57pm UTC](https://www.ruby-forum.com/t/problem-with-1-1-and-component/56189/3 "2006-03-28T20:57:27Z")

</div>

One quick addtion, this seems to only be affecting my mailer class  
model. All the other views seem to be working correctly. Odd…

---

<div class="post-metadata">

**Author:** ![nicksnels](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/aca169/32.png) [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Post date:** [March 28, 2006, 11:34pm UTC](https://www.ruby-forum.com/t/problem-with-1-1-and-component/56189/4 "2006-03-28T23:34:32Z")

</div>

It might, looks similiar, I’ll give it a try in a few.
