Sha256: 0372be364cf093b61340d2381d7ed005a8cf52e16d008ecf6eff58d954dc4494

Contents?: true

Size: 289 Bytes

Versions: 8

Compression:

Stored size: 289 Bytes

Contents

class Player < ActiveRecord::Base
  validates_presence_of :name
  validates_numericality_of :number, :only_integer => true
  validates_uniqueness_of :number, :scope => :team_id, :message => "There is already a player with that number on this team"

  belongs_to :team
  has_one :draft
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
merb-admin-0.5.6 spec/models/activerecord/player.rb
merb-admin-0.5.5 spec/models/activerecord/player.rb
merb-admin-0.5.4 spec/models/activerecord/player.rb
merb-admin-0.5.3 spec/models/activerecord/player.rb
merb-admin-0.5.2 spec/models/activerecord/player.rb
merb-admin-0.5.1 spec/models/activerecord/player.rb
merb-admin-0.5.0 spec/models/activerecord/player.rb
merb-admin-0.4.9 spec/models/activerecord/player.rb