Class: Affiliation

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/affiliation.rb

Overview

Ties Customers and service Providers together.

Schema Information

Table name: affiliations

id                   :integer          not null, primary key
provider_id          :integer          not null
customer_id          :integer          not null
created_at           :datetime         not null
updated_at           :datetime         not null
affiliation_state_id :integer          not null

Instance Method Summary (collapse)

Constructor Details

- (Affiliation) initialize

Returns a new instance of Affiliation



27
28
29
30
# File 'app/models/affiliation.rb', line 27

def initialize(*)
  super
  self.affiliation_state ||= AffiliationState.pending
end