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

Class Method Summary (collapse)

Class Method Details

+ (Object) blocked



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

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

+ (Object) pending



20
21
22
# File 'app/models/affiliation_state.rb', line 20

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

+ (Object) trusted



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

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