# Breaking rails' module naming convention

**URL:** <https://www.ruby-forum.com/t/breaking-rails-module-naming-convention/156023>\
**Category:** Rails\
**Created:** [December 19, 2008, 12:33pm UTC](https://www.ruby-forum.com/t/breaking-rails-module-naming-convention/156023 "2008-12-19T12:33:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![liseki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7ab992/32.png) [@liseki](https://www.ruby-forum.com/u/liseki)\
**Post date:** [December 19, 2008, 12:33pm UTC](https://www.ruby-forum.com/t/breaking-rails-module-naming-convention/156023/1 "2008-12-19T12:33:27Z")

</div>

Hey people,

The module ActiveRecord::ConnectionAdapters::PostgreSQLAdapter lives in  
the file ‘…/connection\_adapters/postgresql\_adapter.rb’. As such it  
breaks the module naming convention. I would like to do something like  
that with a plugin. In my init.rb file I would like to say  
PostgreSQlAdapter which is in a file named postgresql\_adapter.rb. How do  
I do this? Of course I could change the name a bit to fit the convention  
but I prefer concise elegance. Thanks.

---

<div class="post-metadata">

**Author:** ![liseki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7ab992/32.png) [@liseki](https://www.ruby-forum.com/u/liseki)\
**Post date:** [December 19, 2008, 12:42pm UTC](https://www.ruby-forum.com/t/breaking-rails-module-naming-convention/156023/2 "2008-12-19T12:42:11Z")

</div>

On 19 Dec 2008, at 11:33, mo fire wrote:

> I do this? Of course I could change the name a bit to fit the  
> convention  
> but I prefer concise elegance. Thanks.

You can call things whatever the hell you want and put them where you  
want. However if you do that you will need to require the files  
explicitly rather than relying on rails finding and loading the file  
for you.

Fred

---

<div class="post-metadata">

**Author:** ![liseki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7ab992/32.png) [@liseki](https://www.ruby-forum.com/u/liseki)\
**Post date:** [December 19, 2008, 1:02pm UTC](https://www.ruby-forum.com/t/breaking-rails-module-naming-convention/156023/3 "2008-12-19T13:02:02Z")

</div>

Thanks Fred. I guess I was just wandering whether there was a way to  
feed the plugin loader a hash mapping or something. In the plugin I’m  
loading my files first and then doing the relevant module includes.  
Thanks.

Frederick C. wrote:

> On 19 Dec 2008, at 11:33, mo fire wrote:
> 
> > I do this? Of course I could change the name a bit to fit the  
> > convention  
> > but I prefer concise elegance. Thanks.
> 
> You can call things whatever the hell you want and put them where you  
> want. However if you do that you will need to require the files  
> explicitly rather than relying on rails finding and loading the file  
> for you.
> 
> Fred
