Sha256: 991ec14f7011699cb55a9b81291bedb14fe874bcd2ca0cb03fd3d60fb876a67a

Contents?: true

Size: 255 Bytes

Versions: 58

Compression:

Stored size: 255 Bytes

Contents

class State < ActiveRecord::Base
  validates_presence_of :name, :acronym
  validates_uniqueness_of :name, :acronym

  has_many :cities

  def self.array
    @array ||= order(:name).pluck(:name, :acronym).push(['Outro / Other', 'outro / other'])
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
catarse_pagarme-2.14.1 spec/dummy/app/models/state.rb
catarse_pagarme-2.14.0 spec/dummy/app/models/state.rb
catarse_pagarme-2.13.0 spec/dummy/app/models/state.rb
catarse_pagarme-2.12.0 spec/dummy/app/models/state.rb
catarse_pagarme-2.11.0 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.15 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.14 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.13 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.12 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.11 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.10 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.9 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.8 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.7 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.6 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.5 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.4 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.2 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.1 spec/dummy/app/models/state.rb
catarse_pagarme-2.10.0 spec/dummy/app/models/state.rb