Module: Inboxes::ActiveRecordExtension

Defined in:
lib/inboxes/active_record_extension.rb

Instance Method Summary collapse

Instance Method Details

#has_inboxes(options = {}) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/inboxes/active_record_extension.rb', line 3

def has_inboxes(options = {})
  # field  = options[:as]     || name
  # prefix = options[:prefix] || "with"

  has_many :speakers, :dependent => :destroy
  has_many :discussions, :as => :discussable, :through => :speakers
end