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

Version Path
rails_admin-0.4.9 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.4.8 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.4.7 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.4.6 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.4.5 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.4.4 spec/dummy_app/app/mongoid/league.rb
rails_admin-lbgraham-0.4.2 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.4.3 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.4.2 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.4.1 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.4.0 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.3.0 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.2.0 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.1.2 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.1.1 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.1.0 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.0.5 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.0.4 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.0.3 spec/dummy_app/app/mongoid/league.rb
rails_admin-0.0.2 spec/dummy_app/app/mongoid/league.rb