Class: State
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- State
- Defined in:
- app/models/state.rb
Class Method Summary collapse
-
.get_all_states ⇒ Object
Get All States.
Instance Method Summary collapse
-
#name ⇒ Object
has_many :licenses, :class_name => “State”, :foreign_key => “id”.
Class Method Details
.get_all_states ⇒ Object
Get All States
12 13 14 |
# File 'app/models/state.rb', line 12 def self.get_all_states State.pluck(:id, :state_code, :state_name).map{|id, code, name| {id: id, code: code, name: name}} end |
Instance Method Details
#name ⇒ Object
has_many :licenses, :class_name => “State”, :foreign_key => “id”
7 8 9 |
# File 'app/models/state.rb', line 7 def name state_name end |