Class: Organization
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Organization
- Defined in:
- app/models/organization.rb
Instance Method Summary collapse
Instance Method Details
#create_party ⇒ Object
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_party ⇒ Object
24 25 26 27 28 |
# File 'app/models/organization.rb', line 24 def destroy_party if self.party self.party.destroy end end |
#save_party ⇒ Object
19 20 21 22 |
# File 'app/models/organization.rb', line 19 def save_party self.party.description = self.description self.party.save end |
#to_label ⇒ Object
30 31 32 |
# File 'app/models/organization.rb', line 30 def to_label "#{description}" end |