Class: DoorCoreType

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

Overview

== Schema Information

Table name: door_core_types
Database name: primary

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

Constant Summary

Constants included from Models::Auditable

Models::Auditable::ALWAYS_IGNORED

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

#publish_event

Class Method Details

.options_for_select(door_type_id, rc) ⇒ Object



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

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