Sha256: d01dedb031d59c36a2dbdd2f02528a5d452e7e2ff592e9abf1160320e5a475c2
Contents?: true
Size: 473 Bytes
Versions: 25
Compression:
Stored size: 473 Bytes
Contents
module Participant @@types ||= [] def self.included(base) return if @@types.include?(base) @@types << base base.instance_eval do include Associations end end def self.types @@types.sort end module Associations def self.included(base) base.instance_eval do has_many :attendees, {:as => :participant, :dependent => :destroy} has_many :events, {:through => :attendees} end end end end
Version data entries
25 entries across 25 versions & 1 rubygems