Class: DoorFrameType

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

Overview

== Schema Information

Table name: door_frame_types
Database name: primary

id :integer not null, primary key
name :string(255)

Constant Summary

Constants included from Models::Auditable

Models::Auditable::ALWAYS_IGNORED

Constants included from Schedulable

Schedulable::SIMPLE_FORM_OPTIONS

Class Method Summary collapse

Methods included from Models::Auditable

#all_skipped_columns, #audit_reference_data, #creator, #should_not_save_version, #stamp_record, #updater

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Schedulable

config

Methods included from Models::AfterCommittable

#after_commit

Methods included from Models::EventPublishable

#publish_event

Class Method Details

.options_for_select(door_type_id, _rc) ⇒ Object



13
14
15
16
17
# File 'app/models/door_frame_type.rb', line 13

def self.options_for_select(door_type_id, _rc)
  res = DoorInsulationType.by_door_type_id(door_type_id).map(&:door_frame_type).uniq.map { |o| [o.name.titleize, o.id] }
  res = [["Please Choose Door Type", nil]] if res.empty?
  res
end