# Storing settings?

**URL:** <https://www.ruby-forum.com/t/storing-settings/148822>\
**Category:** Rails\
**Created:** [September 17, 2008, 11:25am UTC](https://www.ruby-forum.com/t/storing-settings/148822 "2008-09-17T11:25:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [September 17, 2008, 11:25am UTC](https://www.ruby-forum.com/t/storing-settings/148822/1 "2008-09-17T11:25:14Z")

</div>

Hi, i’m building a blogging engine and it has a settings panel where the  
user set the blogs url, title, how many posts to display, how many in a  
feed, etc.

These settings are stored in a table, in one record, which i’ve got in  
the

Now to have those settings available to all the controllers / helpers /  
etc. i’ve got this defined in the Application Controller…

class ApplicationController \< ActionController::Base  
before\_filter :myconstants

def myconstants  
@settings = Settings.find(:first)  
end  
end

that’s all fine but is there any way i could do this better ?

appreciate any insight on this,

---

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [September 17, 2008, 12:28pm UTC](https://www.ruby-forum.com/t/storing-settings/148822/2 "2008-09-17T12:28:18Z")

</div>

found this, looks way better than what i’m doing.

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

😉
