Class: WindowGlassType
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- WindowGlassType
- Defined in:
- app/models/window_glass_type.rb
Overview
== Schema Information
Table name: window_glass_types
Database name: primary
id :integer not null, primary key
name :string(255)
Class Method Summary collapse
Methods inherited from ApplicationRecord
ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation
Methods included from Models::EventPublishable
Class Method Details
.options_for_select(window_type_id, rc) ⇒ Object
11 12 13 14 15 |
# File 'app/models/window_glass_type.rb', line 11 def self.(window_type_id, rc) res = WindowInsulationType.by_window_type_id(window_type_id).map{|o| o.window_glass_type}.uniq.map{|o| [o.name.titleize, o.id]} res = [["Please Choose Window Type", nil]] if res.empty? return res end |