Class: StrengthTheme

Inherits:
ApplicationRecord show all
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

Delegated Instance Attributes collapse

Belongs to collapse

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::Schedulable

config

Methods included from Models::AfterCommittable

#after_commit

Methods included from Models::EventPublishable

#publish_event

Instance Attribute Details

#clifton_strength_idInteger

Returns Foreign key to the associated Clifton strength.

Returns:

  • (Integer)

    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 }

#priorityInteger

Returns Rank order among the employee's themes (1-34).

Returns:

  • (Integer)

    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_strengthCliftonStrength

Returns:



25
# File 'app/models/strength_theme.rb', line 25

belongs_to :clifton_strength, optional: true

#descriptionObject

Alias for Clifton_strength#description

Returns:

  • (Object)

    Clifton_strength#description

See Also:



20
# File 'app/models/strength_theme.rb', line 20

delegate :name, :description, :youtube_id, to: :clifton_strength

#employee_recordEmployeeRecord

Returns:



23
# File 'app/models/strength_theme.rb', line 23

belongs_to :employee_record, optional: true

#nameObject

Alias for Clifton_strength#name

Returns:

  • (Object)

    Clifton_strength#name

See Also:



20
# File 'app/models/strength_theme.rb', line 20

delegate :name, :description, :youtube_id, to: :clifton_strength

#youtube_idObject

Alias for Clifton_strength#youtube_id

Returns:

  • (Object)

    Clifton_strength#youtube_id

See Also:



20
# File 'app/models/strength_theme.rb', line 20

delegate :name, :description, :youtube_id, to: :clifton_strength