Sha256: 673b40c26e2cdf3495bd8052709963f78703d51404c55e6df374d5c4ac2e114a
Contents?: true
Size: 315 Bytes
Versions: 21
Compression:
Stored size: 315 Bytes
Contents
class League include Mongoid::Document field :name, :type => String include Mongoid::Timestamps attr_accessible :name, :division_ids, :team_ids, :created_at has_many :divisions, :foreign_key => 'custom_league_id' validates_presence_of(:name) def custom_name "League '#{self.name}'" end end
Version data entries
21 entries across 21 versions & 3 rubygems