I think you'd be better off constraining the collection in the  
controller based on the status of the user rather than using the  
permission system. Otherwise you'll be retrieving a whole load of  
unnecessary data from the database which isn't very efficient.

On 12 Dec 2008, at 08:02, rolando wrote:

>
> Hello
>
> How do I set the view permissions with the new permission system on
> the index action
>
> I tried
>
>  def view_permitted?(field)
>    acting_user.signed_up?
>  end
>
> This acts on the show action but does not hide the records in the
> index action, like the former
>
>  def .viewable_by?(user,field)
>    user.signed_up?
>  end
>
> In this section of the manual the index action is not covered
>
> http://cookbook.hobocentral.net/manual/ 
> permissions#view_permission_and_
>
> any hints on how I can make guests see none of the records?
>
> Thanks
>
> Roland
>
> >


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