Isn't there some solution that is "less active" than that? I'm not sure I want the user's browser to be quite that active.
Arthur ________________________________ From: kevinpfromnm <[email protected]> To: Hobo Users <[email protected]> Sent: Mon, July 26, 2010 12:41:07 PM Subject: [Hobo Users] Re: Create Users' Tab Well, in addition to that you'll want a before_filter on the index method. def admin_only redirect_to '/' unless current_user.administrator? end There's a more descriptive way to do the redirect but I can't remember what it is. On Jul 26, 1:38 pm, Joachim <[email protected]> wrote: > W dniu 26.07.2010 21:11, Arthur Baldwin pisze: > > > Um, what syntax would I use in this snippet to indicate that only > > "Administrators" should be able to see the users "tab" at all? > > I think you have to edit main-nav tag. The simpliest way to do this is > to copy it from > > app/views/taglibs/auto/rapid/pages.dryml > > and modify it. Only disadvantage of this solution is that you'll have to > update your main-nav tag every time you'll want it to change. > > Personally I'd just put a link like(I didn't test this so there may be > small errors): > > <a if="¤t_user.try.administrator" with="&User">View users listing</a> > > on home page. -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en. -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
