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.
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---