search for: usergroup_permission_join

Displaying 1 result from an estimated 1 matches for "usergroup_permission_join".

2006 Apr 17
3
model.models.models or model.models.find(:first).models
...llowing three models which all have has_and_belongs_to_many # User <-> UserGroup <-> Permissions class UserGroup < ActiveRecord::Base has_and_belongs_to_many :users, :join_table => "user_usergroup_join" has_and_belongs_to_many :permissions, :join_table => "usergroup_permission_join", :uniq => true end I can do this: permissions = user.user_groups.find(:first).permissions but not: permissions = user.user_groups.permissions I want to get all the user permissions, do I have to loop though each user group and add the permission from each one by one? Many thanks...