Sha256: 060827466461aed440be7747670a56721e298ceb4e7f140b269c30442cf7f8a3
Contents?: true
Size: 323 Bytes
Versions: 2
Compression:
Stored size: 323 Bytes
Contents
class Division < ActiveRecord::Base if Rails.version < '3.2' set_primary_key :custom_id else self.primary_key = :custom_id end belongs_to :league, :foreign_key => 'custom_league_id' has_many :teams validates_numericality_of(:custom_league_id, :only_integer => true) validates_presence_of(:name) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails_admin-0.6.0 | spec/dummy_app/app/active_record/division.rb |
rails_admin-0.5.0 | spec/dummy_app/app/active_record/division.rb |