# Where does class file go

**URL:** <https://www.ruby-forum.com/t/where-does-class-file-go/121659>\
**Category:** Rails\
**Created:** [November 29, 2007, 6:12pm UTC](https://www.ruby-forum.com/t/where-does-class-file-go/121659 "2007-11-29T18:12:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [November 29, 2007, 6:12pm UTC](https://www.ruby-forum.com/t/where-does-class-file-go/121659/1 "2007-11-29T18:12:15Z")

</div>

This is probably a simple question, but I have this class that I wrote  
that will be used in the controller that will encrypt some information.  
I’m just unsure of where to put this class code for the encryption -  
should it go in one of my models, or should it be in a file all by  
itself. I just not sure where to put it because it doesn’t seem like it  
belongs in the controller or models folder. Thanks,

-S

---

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [November 29, 2007, 6:21pm UTC](https://www.ruby-forum.com/t/where-does-class-file-go/121659/2 "2007-11-29T18:21:31Z")

</div>

On Nov 29, 2007 12:12 PM, Shandy N.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> This is probably a simple question, but I have this class that I wrote  
> that will be used in the controller that will encrypt some information.  
> I’m just unsure of where to put this class code for the encryption -  
> should it go in one of my models, or should it be in a file all by  
> itself. I just not sure where to put it because it doesn’t seem like it  
> belongs in the controller or models folder. Thanks,

You can put it in the lib/ directory. This is added to $LOAD\_PATH for  
you.

---

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [November 29, 2007, 6:47pm UTC](https://www.ruby-forum.com/t/where-does-class-file-go/121659/3 "2007-11-29T18:47:19Z")

</div>

you could place them under tools helper folder.

On Nov 29, 2007 12:12 PM, Shandy N.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
