Class: WindowInsulationType

Inherits:
ApplicationRecord show all
Defined in:
app/models/window_insulation_type.rb

Overview

== Schema Information

Table name: window_insulation_types
Database name: primary

id :integer not null, primary key
u_value :float
window_frame_type_id :integer
window_glass_type_id :integer
window_type_id :integer

Indexes

window_insulation_types_window_frame_type_id_idx (window_frame_type_id)
window_insulation_types_window_glass_type_id_idx (window_glass_type_id)

Foreign Keys

window_insulation_types_window_frame_type_id_fk (window_frame_type_id => window_frame_types.id)
window_insulation_types_window_glass_type_id_fk (window_glass_type_id => window_glass_types.id)

Belongs to collapse

Class Method Summary collapse

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_window_type_idActiveRecord::Relation<WindowInsulationType>

A relation of WindowInsulationTypes that are by window type id. Active Record Scope

Returns:

See Also:



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

scope :by_window_type_id, ->(id) { where(:window_type_id => id) }

Instance Method Details

#window_frame_typeWindowFrameType



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

belongs_to :window_frame_type, optional: true

#window_glass_typeWindowGlassType



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

belongs_to :window_glass_type, optional: true

#window_typeWindowType

Returns:

See Also:



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

belongs_to :window_type, optional: true