Sha256: 4857f031042333a9fb9c740f7141eca9c3143dbe60b6f8879b294335b3b8a4c0

Contents?: true

Size: 409 Bytes

Versions: 21

Compression:

Stored size: 409 Bytes

Contents

class Individual < Person

  def to_s
    if first_name.present? || last_name.present?
      [salutation, first_name, middle_name, last_name, suffix].reject(&:blank?).join(" ")
    elsif email.present?
      email.to_s
    elsif id.present?
      "No Name ##{id}"
    else
      "No Name"
    end
  end

  def naming_details_available?
    first_name.present? || last_name.present? || email.present?
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

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