Class: ContactType
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- ContactType
- Includes:
- Checkable, RequiredUniqueSlug
- Defined in:
- app/models/contact_type.rb
Overview
Type of contact
Attributes:
slug [String]
Constant Summary collapse
- SLUG_PATTERN =
/\A[a-z][_a-z]{,16}[a-z]\z/.freeze
Class Method Summary collapse
Class Method Details
.[](slug) ⇒ Object
20 21 22 |
# File 'app/models/contact_type.rb', line 20 def self.[](slug) find_by(slug: slug) end |
.entity_parameters ⇒ Object
24 25 26 |
# File 'app/models/contact_type.rb', line 24 def self.entity_parameters %i[slug] end |