# Dynamic Loading of Configuration From Database

**URL:** <https://www.ruby-forum.com/t/dynamic-loading-of-configuration-from-database/132860>\
**Category:** Rails\
**Created:** [March 25, 2008, 12:06pm UTC](https://www.ruby-forum.com/t/dynamic-loading-of-configuration-from-database/132860 "2008-03-25T12:06:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [March 25, 2008, 12:06pm UTC](https://www.ruby-forum.com/t/dynamic-loading-of-configuration-from-database/132860/1 "2008-03-25T12:06:05Z")

</div>

Hi All,  
I am looking at dynamically loading configuration of rails app depending  
on a flag that is being passed to the app through the HTTP header. The  
config is stored in a database table. Depending on the value received in  
the header, a model will make a call to the db and load up the config  
into the session. Is this best practice for loading config from db? Does  
anyone have a suggestion for doing this a better way?

Thanks in advance,

John

---

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [March 31, 2008, 9:04am UTC](https://www.ruby-forum.com/t/dynamic-loading-of-configuration-from-database/132860/2 "2008-03-31T09:04:20Z")

</div>

More detail, please. You seem to have a strange situation.
