# Namespaces in ruby - question about 2 classes with the same

**URL:** <https://www.ruby-forum.com/t/namespaces-in-ruby-question-about-2-classes-with-the-same/91503>\
**Category:** Rails\
**Created:** [April 9, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/namespaces-in-ruby-question-about-2-classes-with-the-same/91503 "2007-04-09T22:42:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![durexlw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d9b06d/32.png) [@durexlw](https://www.ruby-forum.com/u/durexlw)\
**Post date:** [April 9, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/namespaces-in-ruby-question-about-2-classes-with-the-same/91503/1 "2007-04-09T22:42:48Z")

</div>

I have a report model class in app/models/report.rb. I also have a  
report class in the lib directory which is inside a namespace  
ChipIn::Reports. I am trying to access the app/models report class  
from within the Chipin::Reports namespace in the lib folder. Is this  
possible?

Thanks  
Andy

---

<div class="post-metadata">

**Author:** ![durexlw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d9b06d/32.png) [@durexlw](https://www.ruby-forum.com/u/durexlw)\
**Post date:** [April 9, 2007, 11:15pm UTC](https://www.ruby-forum.com/t/namespaces-in-ruby-question-about-2-classes-with-the-same/91503/2 "2007-04-09T23:15:54Z")

</div>

Try ::Reports. That should knock you out to the global namespace and get  
what you want.

Jason

---

<div class="post-metadata">

**Author:** ![durexlw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/d9b06d/32.png) [@durexlw](https://www.ruby-forum.com/u/durexlw)\
**Post date:** [April 10, 2007, 9:53pm UTC](https://www.ruby-forum.com/t/namespaces-in-ruby-question-about-2-classes-with-the-same/91503/3 "2007-04-10T21:53:11Z")

</div>

Thank you, putting :: before the class worked perfectly.
