# Dynamic Config Plugin for Rails - recommendations? (e.g. storing in database)

**URL:** <https://www.ruby-forum.com/t/dynamic-config-plugin-for-rails-recommendations-e-g-storing-in-database/162044>\
**Category:** Rails\
**Created:** [March 5, 2009, 8:03am UTC](https://www.ruby-forum.com/t/dynamic-config-plugin-for-rails-recommendations-e-g-storing-in-database/162044 "2009-03-05T08:03:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [March 5, 2009, 8:03am UTC](https://www.ruby-forum.com/t/dynamic-config-plugin-for-rails-recommendations-e-g-storing-in-database/162044/1 "2009-03-05T08:03:06Z")

</div>

Wondering if there is an existing plugin/approach for config data that  
you  
want your application to be able to change? In other words a value/pair  
type configuration plugin that persists to the database.  
Just a normal Model would be OK, however any neat tricks how to handle  
the  
fact that each parameter may be a different type? e.g. have a column in  
the  
model to hold the type & store value as a string? have a different  
column  
for each type but then any given parameter (or row in database terms)  
would  
populate only one of the columns?

–  
Greg  
[http://blog.gregnet.org/](http://blog.gregnet.org/)

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [March 5, 2009, 9:16am UTC](https://www.ruby-forum.com/t/dynamic-config-plugin-for-rails-recommendations-e-g-storing-in-database/162044/2 "2009-03-05T09:16:22Z")

</div>

i don’t know of any plugins, but i did the same thing once for a  
project of mine. i used your first alternative. my configuration model  
had only two attributes: “name” and “value”. i only saved strings. for  
config this was sufficient.

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [March 5, 2009, 5:28pm UTC](https://www.ruby-forum.com/t/dynamic-config-plugin-for-rails-recommendations-e-g-storing-in-database/162044/3 "2009-03-05T17:28:32Z")

</div>

I’ve used the rails-settings plugin before - very easy to use, and  
stores  
settings as YAML, so they hold whatever datatype you put in.

> **[GitHub - AlexJWayne/rails-settings: Settings is a plugin that makes managing a...](https://github.com/AlexJWayne/rails-settings/tree/master)**
>
> master

–Matt J.

On Mar 5, 2:02 am, Greg H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
