Sha256: dd9f06bf4d585d5be59b92963dc2f1b48614fad6e1eec253150ce6b7fb9eb439

Contents?: true

Size: 434 Bytes

Versions: 8

Compression:

Stored size: 434 Bytes

Contents

module C80Contest
  # noinspection RailsParamDefResolve
  class Bid < ActiveRecord::Base

    validates :title,
              :presence => true,
              :length => { in: 5..100 }

    validates :phone,
              :presence => true,
              :format => { with: /\A((8|\+?7)[\- ]?)?(\(?\d{3,5}\)?[\- ]?)?[\d\- ]{5,10}\z/}

    validates_presence_of :photo

    mount_uploader :photo, C80Contest::BidPhotoUploader
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
c80_contest-0.1.8 app/models/c80_contest/bid.rb
c80_contest-0.1.7 app/models/c80_contest/bid.rb
c80_contest-0.1.6 app/models/c80_contest/bid.rb
c80_contest-0.1.5 app/models/c80_contest/bid.rb
c80_contest-0.1.4 app/models/c80_contest/bid.rb
c80_contest-0.1.3 app/models/c80_contest/bid.rb
c80_contest-0.1.2 app/models/c80_contest/bid.rb
c80_contest-0.1.1 app/models/c80_contest/bid.rb