Class: UnderFloorType
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- UnderFloorType
- Defined in:
- app/models/under_floor_type.rb
Overview
== Schema Information
Table name: under_floor_types
Database name: primary
id :integer not null, primary key
name :string(255)
Instance Method Summary collapse
-
#needs_underlayment? ⇒ Boolean
room_configuration has_one under_floor, ceiling; has_many exterior_walls under_floor belongs_to room_configuration, under_floor_type, under_floor_insulation_type ceiling has_many skylights; belongs_to room_configuration, ceiling_type, ceiling_insulation_type skylight belongs_to ceiling, skylight_glass_type, skylight_frame_type, skylight_insulation_type exterior_wall has_many windows, doors; belongs_to room_configuration, exterior_wall_type, exterior_wall_insulation_type window belongs_to exterior_wall, window_type, window_glass_type, window_frame_type, window_insulation_type door belongs_to exterior_wall, door_type, door_core_type, door_frame_type, door_insulation_type.
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Models::EventPublishable
Instance Method Details
#needs_underlayment? ⇒ Boolean
room_configuration has_one under_floor, ceiling; has_many exterior_walls
under_floor belongs_to room_configuration, under_floor_type, under_floor_insulation_type
ceiling has_many skylights; belongs_to room_configuration, ceiling_type, ceiling_insulation_type
skylight belongs_to ceiling, skylight_glass_type, skylight_frame_type, skylight_insulation_type
exterior_wall has_many windows, doors; belongs_to room_configuration, exterior_wall_type, exterior_wall_insulation_type
window belongs_to exterior_wall, window_type, window_glass_type, window_frame_type, window_insulation_type
door belongs_to exterior_wall, door_type, door_core_type, door_frame_type, door_insulation_type
18 19 20 21 22 23 24 |
# File 'app/models/under_floor_type.rb', line 18 def needs_underlayment? res = true if self.name.index("heated room") res = false end return res end |