Module: Gemboree::ActsAsActor

Defined in:
lib/gemboree/acts_as_actor.rb

Defined Under Namespace

Modules: InstanceMethods

Instance Method Summary collapse

Instance Method Details

#acts_as_actor(options = {}) ⇒ Object



4
5
6
7
8
# File 'lib/gemboree/acts_as_actor.rb', line 4

def acts_as_actor(options = {})
  has_many :user_roles, :foreign_key => "user_id", :dependent => :destroy
  has_many :roles, :through => :user_roles
  include InstanceMethods
end