# Organize application constants in header files

**URL:** <https://www.ruby-forum.com/t/organize-application-constants-in-header-files/124568>\
**Category:** Rails\
**Created:** [December 30, 2007, 10:35am UTC](https://www.ruby-forum.com/t/organize-application-constants-in-header-files/124568 "2007-12-30T10:35:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsampathkumar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/4da419/32.png) [@gsampathkumar](https://www.ruby-forum.com/u/gsampathkumar)\
**Post date:** [December 30, 2007, 10:35am UTC](https://www.ruby-forum.com/t/organize-application-constants-in-header-files/124568/1 "2007-12-30T10:35:43Z")

</div>

Hi,  
Is there a way in RoR to add common string and integer constants  
to a central location (like a C++ header file) that can then be  
included in your application code as needed. Looked around for a bit  
but didn’t really find a satisfactory answer. Apologize for the  
newbess of the question:)

–Gautam

---

<div class="post-metadata">

**Author:** ![gsampathkumar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/4da419/32.png) [@gsampathkumar](https://www.ruby-forum.com/u/gsampathkumar)\
**Post date:** [December 30, 2007, 3:34pm UTC](https://www.ruby-forum.com/t/organize-application-constants-in-header-files/124568/2 "2007-12-30T15:34:47Z")

</div>

I tend to put these into the config/environment.rb. You can probably  
put them into a module and include this in the environment.rb or  
application.rb also if you want to keep things cleaner.
