Class: Organization

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

Instance Method Summary collapse

Instance Method Details

#create_partyObject



10
11
12
13
14
15
16
17
# File 'app/models/organization.rb', line 10

def create_party
  pty = Party.new
  pty.description = self.description
  pty.business_party = self
  
  pty.save
  self.save
end

#destroy_partyObject



24
25
26
27
28
# File 'app/models/organization.rb', line 24

def destroy_party
  if self.party
   self.party.destroy
  end
end

#save_partyObject



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

def save_party
   self.party.description = self.description
   self.party.save
end

#to_labelObject



30
31
32
# File 'app/models/organization.rb', line 30

def to_label
  "#{description}"
end