On 15 Mar, 13:51, Michael Pavling <[email protected]> wrote:

> you can add a "rights" method to your user that collects up all the
> rights for all of the User's roles:
>
> def rights
>   roles.collect { |role| role.rights }.flatten.uniq
> end
>
> This gives you a starting point... you can memoize that method if you
> access it a lot, or tweak it however suits...
thanks. i will try this, but i'm searching for something that can be
used with some named_scope (based on the rights).

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

Reply via email to