I am using the proven authorization plugin to defines roles for users,
so I can get all groups where a user is 'member'
@groups = current_user.group_memberships
I have an habtm association between groups and events
class Group < ActiveRecord::Base
class Event < ActiveRecord::Base
I am trying to list and paginate (with the will_paginate plugin) all
events in all groups a user belongs to...
I thought initially to build an array of ids from @groups and
@events = Event.paginate :page => params[:page], :conditions =>
["group_id IN(?)", group_ids]
but group_id is not a key in the events table....
any hint ? thanks