Sha256: 01c91b27464ee18acdaf74e5f11d27df053bd27f4a0b1d207b313248a6a86883

Contents?: true

Size: 636 Bytes

Versions: 3

Compression:

Stored size: 636 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

3 entries across 3 versions & 1 rubygems

Version Path
rails_admin-0.6.0 spec/dummy_app/app/mongoid/draft.rb
rails_admin-0.5.0 spec/dummy_app/app/mongoid/draft.rb
rails_admin-0.0.1 spec/dummy_app/app/mongoid/draft.rb