Sha256: be520a08cbe4b424045b15214642e123f8dd5dde0486ed963e81f7a0f170458d

Contents?: true

Size: 300 Bytes

Versions: 21

Compression:

Stored size: 300 Bytes

Contents

class Company < Person

  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

  def naming_details_available?
    email.present? || company_name.present?
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
artfully_ose-1.2.0.pre.23 app/models/company.rb
artfully_ose-1.2.0.pre.21 app/models/company.rb
artfully_ose-1.2.0.pre.20 app/models/company.rb
artfully_ose-1.2.0.pre.19 app/models/company.rb
artfully_ose-1.2.0.pre.18 app/models/company.rb
artfully_ose-1.2.0.pre.17 app/models/company.rb
artfully_ose-1.2.0.pre.16 app/models/company.rb
artfully_ose-1.2.0.pre.15 app/models/company.rb
artfully_ose-1.2.0.pre.12 app/models/company.rb
artfully_ose-1.2.0.pre.11 app/models/company.rb
artfully_ose-1.2.0.pre.10 app/models/company.rb
artfully_ose-1.2.0.pre.9 app/models/company.rb
artfully_ose-1.2.0.pre.8 app/models/company.rb
artfully_ose-1.2.0.pre.7 app/models/company.rb
artfully_ose-1.2.0.pre.6 app/models/company.rb
artfully_ose-1.2.0.pre.5 app/models/company.rb
artfully_ose-1.2.0.pre.4 app/models/company.rb
artfully_ose-1.2.0.pre.3 app/models/company.rb
artfully_ose-1.2.0.pre.2 app/models/company.rb
artfully_ose-1.2.0.pre.1 app/models/company.rb