Class: DoorInsulationType

Inherits:
ApplicationRecord show all
Includes:
Models::Auditable
Defined in:
app/models/door_insulation_type.rb

Overview

== Schema Information

Table name: door_insulation_types
Database name: primary

id :integer not null, primary key
u_value :float
door_core_type_id :integer
door_frame_type_id :integer
door_type_id :integer

Indexes

door_insulation_types_door_core_type_id_idx (door_core_type_id)
door_insulation_types_door_frame_type_id_idx (door_frame_type_id)

Foreign Keys

door_insulation_types_door_core_type_id_fk (door_core_type_id => door_core_types.id)
door_insulation_types_door_frame_type_id_fk (door_frame_type_id => door_frame_types.id)

Constant Summary

Constants included from Models::Auditable

Models::Auditable::ALWAYS_IGNORED

Belongs to collapse

Methods included from Models::Auditable

#creator, #updater

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

#publish_event

Class Method Details

.by_door_type_idActiveRecord::Relation<DoorInsulationType>

A relation of DoorInsulationTypes that are by door type id. Active Record Scope

Returns:

See Also:



29
# File 'app/models/door_insulation_type.rb', line 29

scope :by_door_type_id, ->(id) { where(:door_type_id => id) }

Instance Method Details

#door_core_typeDoorCoreType



27
# File 'app/models/door_insulation_type.rb', line 27

belongs_to :door_core_type, optional: true

#door_frame_typeDoorFrameType



28
# File 'app/models/door_insulation_type.rb', line 28

belongs_to :door_frame_type, optional: true

#door_typeDoorType

Returns:

See Also:



26
# File 'app/models/door_insulation_type.rb', line 26

belongs_to :door_type, optional: true