Sha256: 0fcd4a364e79e17a1e5113850a16a804cd7a2c5df8a96919a2dd65400281abbb

Contents?: true

Size: 329 Bytes

Versions: 2

Compression:

Stored size: 329 Bytes

Contents

module Admin
  class City < ActiveRecord::Base
    include AssociationCommon
    self.table_name = "cities"
    belongs_to :country
    belongs_to :state

    scope :national, -> {includes(:country).where("countries.code = ?", "BR")}
    scope :international, -> {includes(:country).where("countries.code <> ?", "BR")}
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
carnival-0.0.11 test/dummy/app/models/admin/city.rb
carnival-0.0.10 test/dummy/app/models/admin/city.rb