Sha256: fc7fa6e3d5272c6f66a318482031de86069f83a7a27b6a3872667717d904dfab

Contents?: true

Size: 603 Bytes

Versions: 4

Compression:

Stored size: 603 Bytes

Contents

class Draft
  include Mongoid::Document
  include Mongoid::Timestamps

  belongs_to :player
  belongs_to :team
  field :date, type: Date
  field :round, type: Integer
  field :pick, type: Integer
  field :overall, type: Integer
  field :college, type: String
  field :notes, type: String

  validates_presence_of(:player_id, only_integer: true)
  validates_presence_of(:team_id, only_integer: true)
  validates_presence_of(:date)
  validates_numericality_of(:round, only_integer: true)
  validates_numericality_of(:pick, only_integer: true)
  validates_numericality_of(:overall, only_integer: true)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_admin-0.6.4 spec/dummy_app/app/mongoid/draft.rb
rails_admin-0.6.3 spec/dummy_app/app/mongoid/draft.rb
rails_admin-0.6.2 spec/dummy_app/app/mongoid/draft.rb
rails_admin-0.6.1 spec/dummy_app/app/mongoid/draft.rb