Class: IdentificationNumber

Inherits:
ApplicationRecord show all
Includes:
Models::Auditable
Defined in:
app/models/identification_number.rb

Overview

== Schema Information

Table name: identification_numbers
Database name: primary

id :integer not null, primary key
category :text
number :string(255)
created_at :datetime
updated_at :datetime
customer_id :integer

Indexes

index_identification_numbers_on_customer_id (customer_id)

Constant Summary collapse

MAIN_US =
"EIN/Fed. Tax ID"
MAIN_CA =
""

Constants included from Models::Auditable

Models::Auditable::ALWAYS_IGNORED

Belongs to collapse

Methods included from Models::Auditable

#creator, #updater

Class Method Summary collapse

Methods included from Models::Auditable

#all_skipped_columns, #audit_reference_data, #should_not_save_version, #stamp_record

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::EventPublishable

#publish_event

Class Method Details

.categoriesObject



38
39
40
41
42
43
44
45
# File 'app/models/identification_number.rb', line 38

def self.categories
  [["EIN/Fed. Tax ID", "EIN/Fed. Tax ID"],
  ["Business Number (BN)", "Business Number (BN)"],
  ["Home Improvement License", "Home Improvement License"],
  ["Village License", "Village License"],
  ["D-U-N-S Number","D-U-N-S Number"],
  ["Other (please specify)", "Other"]]
end

Instance Method Details

#customerCustomer

Returns:

See Also:



21
# File 'app/models/identification_number.rb', line 21

belongs_to :customer, optional: true