test/dummy/app/models/admin/city.rb in carnival-0.0.55 vs test/dummy/app/models/admin/city.rb in carnival-0.0.56

- old
+ new

@@ -2,9 +2,10 @@ class City < ActiveRecord::Base include Carnival::ModelHelper self.table_name = "cities" belongs_to :country belongs_to :state + validates_presence_of :name scope :national, -> {includes(:country).where("countries.code = ?", "BR")} scope :international, -> {includes(:country).where("countries.code <> ?", "BR")} end end