On Lunes, 23 de Noviembre de 2009 15:20:36 chouti escribió:
> Hello this is one question comes from newbie
>
> 1. I have one active_scaffold controller, for example, items.
> 2. I also have many users, first I need after every user logged in,
> can and only can see the items  created by himself/herself.
> 3. Users has and belongs many roles. And admins can edit other user's
> role...
>
> I think first of all, I need a solution for point 2.
>
> If you have any ideas, waiting for your good news :-)

Point 2: try with conditions_for_collection. I don't know your models neither 
your method to log in, but it would be something like this:
def conditions_for_collection
  {:created_by_id => current_user}
end

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

--

You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=.


Reply via email to