Sha256: 84622ac9c2a9fa1da73b36533d07aa87a8c956a57eba94b6dfd757c6b14717f0

Contents?: true

Size: 364 Bytes

Versions: 10

Compression:

Stored size: 364 Bytes

Contents

module C80Push
  class Region < ActiveRecord::Base
    has_and_belongs_to_many :dealers
    has_and_belongs_to_many :offices

    default_scope -> { order(:ord => :asc) }

    validates :title,
              :uniqueness => true,
              :presence => true,
              :length => { in: 2..90 }

    validates :ord,
              :presence => true

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
c80_push-0.1.0.11 app/models/c80_push/region.rb
c80_push-0.1.0.10 app/models/c80_push/region.rb
c80_push-0.1.0.8 app/models/c80_push/region.rb
c80_push-0.1.0.7 app/models/c80_push/region.rb
c80_push-0.1.0.6 app/models/c80_push/region.rb
c80_push-0.1.0.5 app/models/c80_push/region.rb
c80_push-0.1.0.4 app/models/c80_push/region.rb
c80_push-0.1.0.3 app/models/c80_push/region.rb
c80_push-0.1.0.2 app/models/c80_push/region.rb
c80_push-0.1.0.1 app/models/c80_push/region.rb