Displaying 1 result from an estimated 1 matches for "user_usergroup_join".
2006 Apr 17
3
model.models.models or model.models.find(:first).models
I the following 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...