Class: State

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/state.rb

Class Method Summary collapse

Class Method Details

.arrayObject



4
5
6
7
8
9
10
11
12
# File 'app/models/state.rb', line 4

def self.array
  return @array if @array
  @array = []
  self.order(:name).all.each do |state|
    @array << [state.name, state.acronym]
  end
  @array.push(['Outro / Other', 'outro / other'])
  @array
end