Class: Company
- Defined in:
- app/models/company.rb
Instance Attribute Summary
Attributes inherited from Person
#skip_commit, #skip_sync_to_mailchimp
Instance Method Summary collapse
Methods inherited from Person
#add_phone_if_missing, #any_current_passes?, companies, #company?, create_dummy_for, #create_subscribed_lists_notes!, #default_to_individual, #destroyable?, dummy_for, #dupe_code, find_by_email_and_organization, find_by_import, find_by_organization, find_dupes_in, find_or_create, first_or_create, first_or_initialize, #has_nothing?, #has_something?, in_household, #individual?, individuals, mergables, merge, #new_note, not_in_household, #phone_missing?, #possessive, #previous_changes_sentence, recent, #relationships_of_relation, #send_pass_summary_email, #starred_actions, #unstarred_actions, #update_address, #update_from_import, #update_name, #validate_naming_details
Methods included from Ext::DelayedIndexing
Methods included from Valuation::LifetimeMemberships
#calculate_lifetime_memberships, #lifetime_orders
Methods included from Valuation::LifetimeDonations
#calculate_lifetime_donations, #lifetime_orders
Methods included from Valuation::LifetimeTicketValue
#calculate_lifetime_ticket_value, #lifetime_orders
Methods included from Valuation::LifetimeValue
#calculate_lifetime_value, #lifetime_orders
Methods included from OhNoes::Destroy
Instance Method Details
#naming_details_available? ⇒ Boolean
15 16 17 |
# File 'app/models/company.rb', line 15 def naming_details_available? email.present? || company_name.present? end |
#to_s ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'app/models/company.rb', line 3 def to_s if company_name.present? company_name.to_s elsif email.present? email.to_s elsif id.present? "No Name ##{id}" else "No Name" end end |