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

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::EventPublishable

#publish_event

Instance Attribute Details

#priorityObject (readonly)



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

validates :priority, :numericality => { :only_integer => true, :less_than_or_equal_to => 34, :greater_than_or_equal_to => 1 }

Instance Method Details

#clifton_strengthCliftonStrength



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

belongs_to :clifton_strength, optional: true

#descriptionObject

Alias for Clifton_strength#description

Returns:

  • (Object)

    Clifton_strength#description

See Also:



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

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

#employee_recordEmployeeRecord



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:



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

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

#youtube_idObject

Alias for Clifton_strength#youtube_id

Returns:

  • (Object)

    Clifton_strength#youtube_id

See Also:



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

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