Class: StrengthTheme
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- StrengthTheme
- Defined in:
- app/models/strength_theme.rb
Overview
== Schema Information
Table name: strength_themes
Database name: primary
id :integer not null, primary key
priority :integer not null
clifton_strength_id :integer not null
employee_record_id :integer
Indexes
idx_employee_record_strength_theme (employee_record_id,clifton_strength_id) UNIQUE
Foreign Keys
strength_themes_employee_record_id_fk (employee_record_id => employee_records.id) ON DELETE => cascade
Constant Summary
Constants included from Models::Schedulable
Models::Schedulable::SIMPLE_FORM_OPTIONS
Instance Attribute Summary collapse
-
#clifton_strength_id ⇒ Integer
Foreign key to the associated Clifton strength.
-
#priority ⇒ Integer
Rank order among the employee's themes (1-34).
Delegated Instance Attributes collapse
-
#description ⇒ Object
Alias for Clifton_strength#description.
-
#name ⇒ Object
Alias for Clifton_strength#name.
-
#youtube_id ⇒ Object
Alias for Clifton_strength#youtube_id.
Belongs to collapse
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Models::Schedulable
Methods included from Models::AfterCommittable
Methods included from Models::EventPublishable
Instance Attribute Details
#clifton_strength_id ⇒ Integer
Returns Foreign key to the associated Clifton strength.
32 |
# File 'app/models/strength_theme.rb', line 32 validates :clifton_strength_id, uniqueness: { scope: :employee_record_id } |
#priority ⇒ Integer
Returns Rank order among the employee's themes (1-34).
29 |
# File 'app/models/strength_theme.rb', line 29 validates :priority, numericality: { only_integer: true, less_than_or_equal_to: 34, greater_than_or_equal_to: 1 } |
Instance Method Details
#clifton_strength ⇒ CliftonStrength
25 |
# File 'app/models/strength_theme.rb', line 25 belongs_to :clifton_strength, optional: true |
#description ⇒ Object
Alias for Clifton_strength#description
20 |
# File 'app/models/strength_theme.rb', line 20 delegate :name, :description, :youtube_id, to: :clifton_strength |
#employee_record ⇒ EmployeeRecord
23 |
# File 'app/models/strength_theme.rb', line 23 belongs_to :employee_record, optional: true |
#name ⇒ Object
Alias for Clifton_strength#name
20 |
# File 'app/models/strength_theme.rb', line 20 delegate :name, :description, :youtube_id, to: :clifton_strength |
#youtube_id ⇒ Object
Alias for Clifton_strength#youtube_id
20 |
# File 'app/models/strength_theme.rb', line 20 delegate :name, :description, :youtube_id, to: :clifton_strength |