Class: AffiliationState

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

Overview

The state of an Affiliation on the system.

Instances of states should be unique among the system. Use singleton methods such as pending to retrieve them.

Schema Information

Table name: affiliation_states

id         :integer          not null, primary key
label      :string           not null
created_at :datetime
updated_at :datetime

Indexes

index_affiliation_states_on_label  (label) UNIQUE

Class Method Summary (collapse)

Class Method Details

+ (Object) confirmed



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

def self.confirmed
  find_by! label: 'confirmed'
end

+ (Object) pending



24
25
26
# File 'app/models/affiliation_state.rb', line 24

def self.pending
  find_by! label: 'pending'
end

+ (Object) unauthorized



32
33
34
# File 'app/models/affiliation_state.rb', line 32

def self.unauthorized
  find_by! label: 'unauthorized'
end