W dniu 05.06.2010 13:40, atmorell pisze:
> Hello,
>
> I have restricted my users to the index page of a model:
>
> auto_actions :all, :except => [ :index ]
>
> How do grant administrators access to the action?
You want index to be accessible only for admins? If so you probably want
auto_actions :all
def index
if current_user.administrator?
hobo_index
else
# redirect somewhere, show notice or something like that
# because user isn't allowed to see this
end
end
--
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.