W dniu 05.08.2010 20:46, Arthur Baldwin pisze:
> For example the "users" tab will only display for administrators
> 
> I thought I might be able to do this inside the user_controller.rb file with 
> something like:
> 
> auto_actions_for :user, :index  (or something like that)
> 
> but no luck so far...any suggestions?

I'd say you should remove index from auto actions and do something like

index_action :index do
  unless current_user.administrator?
      # redirect, set flash[:notice] etc.
  end
  hobo_index
end


You should also open app/views/taglibs/auto/rapid/pages.dryml copy
definition of tag main-nav and change add

  if="&current_user.administrator?"

to nav-item leading to users index. Or you could add

  <a if="&current_user.administrator?" with="&User">Users index</a>

to some page (eg. homepage).


-- 
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.

Reply via email to