Class: Popolo::Membership

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps
Defined in:
app/models/popolo/membership.rb

Overview

A relationship between a person and an organization.

Instance Method Summary collapse

Instance Method Details

#to_s(options = {}) ⇒ Object



39
40
41
42
43
44
45
46
47
48
# File 'app/models/popolo/membership.rb', line 39

def to_s(options = {})
  label || case options[:format]
  when :person
    person.to_s
  when :organization
    organization.to_s
  else
    "#{organization.to_s} / #{person.to_s}"
  end
end