Class: IdentificationNumber
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- IdentificationNumber
- 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 =
Main us.
"EIN/Fed. Tax ID".freeze
- MAIN_CA =
Main ca.
"".freeze
Constants included from Models::Auditable
Models::Auditable::ALWAYS_IGNORED
Constants included from Schedulable
Schedulable::SIMPLE_FORM_OPTIONS
Instance Attribute Summary collapse
- #category ⇒ Object readonly
- #number ⇒ Object readonly
Belongs to collapse
Methods included from Models::Auditable
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 Schedulable
Methods included from Models::AfterCommittable
Methods included from Models::EventPublishable
Instance Attribute Details
#category ⇒ Object (readonly)
24 |
# File 'app/models/identification_number.rb', line 24 validates :category, presence: { message: "can't be blank" } |
#number ⇒ Object (readonly)
23 |
# File 'app/models/identification_number.rb', line 23 validates :number, presence: true |
Class Method Details
.categories ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'app/models/identification_number.rb', line 40 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
#customer ⇒ Customer
21 |
# File 'app/models/identification_number.rb', line 21 belongs_to :customer, optional: true |