# App Configuration Setting

**URL:** <https://www.ruby-forum.com/t/app-configuration-setting/157809>\
**Category:** Rails\
**Created:** [January 15, 2009, 2:55pm UTC](https://www.ruby-forum.com/t/app-configuration-setting/157809 "2009-01-15T14:55:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/87869e/32.png) [@daz](https://www.ruby-forum.com/u/daz)\
**Post date:** [January 15, 2009, 2:55pm UTC](https://www.ruby-forum.com/t/app-configuration-setting/157809/1 "2009-01-15T14:55:16Z")

</div>

What is the best way to allow site-wide setting to be changed?

For example, an admin user could be able to set the site theme, the  
number of images shown on the landing page, the title of the app,  
greeting given etc.

## Solutions I can think of are: Database Solution

A Site model, with only one instance

## File Based Solution

Configuration file(s) that can be edited by admins from within the  
browser

What do people think or do in their sites?

cheers,

DAZ

---

<div class="post-metadata">

**Author:** ![daz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/87869e/32.png) [@daz](https://www.ruby-forum.com/u/daz)\
**Post date:** [January 15, 2009, 5:25pm UTC](https://www.ruby-forum.com/t/app-configuration-setting/157809/2 "2009-01-15T17:25:24Z")

</div>

On Jan 15, 2009, at 5:54 AM, DAZ wrote:

> A Site model, with only one instance
> 
> ## File Based Solution
> 
> Configuration file(s) that can be edited by admins from within the  
> browser
> 
> What do people think or do in their sites?

I use [http://agilewebdevelopment.com/plugins/application\_config](http://agilewebdevelopment.com/plugins/application_config) for  
things that won’t change frequently… api keys, etc…

Other times I’ve created a Preference model with key/value attributes  
and they can edit that…

-philip
