Matt Harrison wrote:
>
> I have no idea if this is the best method by any means, but I have used
> it before with no problems:
>
> I created a model called AppConfig which had an id, a key and a value. I
> could set the key to the name of the configuration (such as
> "allow_new_signups") and then set the value as required.
>
> Then all I needed to do was AppConfig.find_by_key("allow_new_signups")
> and I have my configurations back.
>
> As I say, there are possibly much better ways to do this, but it worked
> fine for my needs. YMMV.
>
> Hope this helps.
>
> Matt
Thankyou Matt.
I would like to explore that option further. I think it has potential
:-)
Very much appreciated the input
James
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---