# Managing Application Preferences...?

**URL:** <https://www.ruby-forum.com/t/managing-application-preferences/140543>\
**Category:** Rails\
**Created:** [June 16, 2008, 3:12am UTC](https://www.ruby-forum.com/t/managing-application-preferences/140543 "2008-06-16T03:12:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dezrtdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f4b2a3/32.png) [@dezrtdude](https://www.ruby-forum.com/u/dezrtdude)\
**Post date:** [June 16, 2008, 3:12am UTC](https://www.ruby-forum.com/t/managing-application-preferences/140543/1 "2008-06-16T03:12:33Z")

</div>

Hi All,

I’m looking to manage a few system preferences that are available  
_only_ to the administrator – things like “post\_expiration”,  
“post\_max\_length”, etc. I was going to create a table and have a one-  
to-many relationship, but decided that could get hairy as I’d need  
concatenated keys, etc, and I really only want the Admin to have  
access to prefs anyway. Anyway, I’ve come across several posts  
regarding different mechanisms and I wanted to get yet another opinion  
regarding best practices for this.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dezrtdude](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f4b2a3/32.png) [@dezrtdude](https://www.ruby-forum.com/u/dezrtdude)\
**Post date:** [June 16, 2008, 4:00pm UTC](https://www.ruby-forum.com/t/managing-application-preferences/140543/2 "2008-06-16T16:00:39Z")

</div>

Michael Williams wrote:

> Hi All,
> 
> I’m looking to manage a few system preferences that are available  
> _only_ to the administrator – things like “post\_expiration”,  
> “post\_max\_length”, etc. I was going to create a table and have a one-  
> to-many relationship, but decided that could get hairy as I’d need  
> concatenated keys, etc, and I really only want the Admin to have  
> access to prefs anyway. Anyway, I’ve come across several posts  
> regarding different mechanisms and I wanted to get yet another opinion  
> regarding best practices for this.
> 
> Thanks in advance.

I store those defaults in a table maintained with a standard controller  
and views, then limit access with a before filter in the controller that  
checks for admin role/status. The links to those forms are on an admin  
menu that shows up along with the standard menu if the user has admin  
role.
