Sha256: a1ee6d75faebbc3fb92883cfcbbfe8482dd2e3e3c1e56dd7ba2c7a806be9f60c

Contents?: true

Size: 333 Bytes

Versions: 23

Compression:

Stored size: 333 Bytes

Contents

module Admin
  class City < ActiveRecord::Base
    include Carnival::ModelHelper
    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

23 entries across 23 versions & 1 rubygems

Version Path
carnival-0.0.55 test/dummy/app/models/admin/city.rb
carnival-0.0.54 test/dummy/app/models/admin/city.rb
carnival-0.0.53 test/dummy/app/models/admin/city.rb
carnival-0.0.52 test/dummy/app/models/admin/city.rb
carnival-0.0.51 test/dummy/app/models/admin/city.rb
carnival-0.0.50 test/dummy/app/models/admin/city.rb
carnival-0.0.49 test/dummy/app/models/admin/city.rb
carnival-0.0.48 test/dummy/app/models/admin/city.rb
carnival-0.0.47 test/dummy/app/models/admin/city.rb
carnival-0.0.45 test/dummy/app/models/admin/city.rb
carnival-0.0.44 test/dummy/app/models/admin/city.rb
carnival-0.0.43 test/dummy/app/models/admin/city.rb
carnival-0.0.42 test/dummy/app/models/admin/city.rb
carnival-0.0.41 test/dummy/app/models/admin/city.rb
carnival-0.0.40 test/dummy/app/models/admin/city.rb
carnival-0.0.39 test/dummy/app/models/admin/city.rb
carnival-0.0.38 test/dummy/app/models/admin/city.rb
carnival-0.0.37 test/dummy/app/models/admin/city.rb
carnival-0.0.36 test/dummy/app/models/admin/city.rb
carnival-0.0.35 test/dummy/app/models/admin/city.rb