Sha256: e10f80d5a2319839256544a57bd196a186e4b98f60c13619fd241a7abdc916fe

Contents?: true

Size: 962 Bytes

Versions: 12

Compression:

Stored size: 962 Bytes

Contents

class Dorsale::CustomerVault::Corporation < Dorsale::CustomerVault::Person
  serialize      :data,  Dorsale::CustomerVault::CorporationData
  def_delegators :data, *Dorsale::CustomerVault::CorporationData.methods_to_delegate

  validates :corporation_name, presence: true
  has_many :individuals

  def self_and_related_events
    ::Dorsale::CustomerVault::Event.where(person: [self] + individuals)
  end

  def name
    corporation_name
  end

  def name=(corporation_name)
    self.corporation_name = corporation_name
  end

  private def first_name;  raise NoMethodError; end
  private def first_name=; raise NoMethodError; end
  private def last_name;   raise NoMethodError; end
  private def last_name=;  raise NoMethodError; end
  private def corporation;   raise NoMethodError; end
  private def corporation=;  raise NoMethodError; end
  private def corporation_id;   raise NoMethodError; end
  private def corporation_id=;  raise NoMethodError; end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
dorsale-3.8.1 app/models/dorsale/customer_vault/corporation.rb
dorsale-3.8.0 app/models/dorsale/customer_vault/corporation.rb
dorsale-3.7.8 app/models/dorsale/customer_vault/corporation.rb
dorsale-3.7.7 app/models/dorsale/customer_vault/corporation.rb
dorsale-3.7.6 app/models/dorsale/customer_vault/corporation.rb
dorsale-3.7.5 app/models/dorsale/customer_vault/corporation.rb
dorsale-3.7.4 app/models/dorsale/customer_vault/corporation.rb
dorsale-3.7.2 app/models/dorsale/customer_vault/corporation.rb
dorsale-3.7.1 app/models/dorsale/customer_vault/corporation.rb
dorsale-3.7.0 app/models/dorsale/customer_vault/corporation.rb
dorsale-3.6.1 app/models/dorsale/customer_vault/corporation.rb
dorsale-3.6.0 app/models/dorsale/customer_vault/corporation.rb