Class: Voltage

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

Overview

== Schema Information

Table name: voltages
Database name: primary

id :integer not null, primary key

Class Method Summary collapse

Instance 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

.options_for_selectObject



11
12
13
# File 'app/models/voltage.rb', line 11

def self.options_for_select
  all.order(:id).pluck(:id)
end

Instance Method Details

#to_sObject



15
16
17
# File 'app/models/voltage.rb', line 15

def to_s
  "#{self.id} V"
end