Sha256: 1c5f281b22136b4af9ae15308ab0289bcfe7c29f27957bcda7c10983bb9f3132

Contents?: true

Size: 242 Bytes

Versions: 8

Compression:

Stored size: 242 Bytes

Contents

class League < ActiveRecord::Base
  validates_presence_of(:name)

  has_many :divisions, :foreign_key => 'custom_league_id'
  has_many :teams, :through => :divisions, :readonly => true

  def custom_name
    "League '#{self.name}'"
  end
end

Version data entries

8 entries across 8 versions & 4 rubygems

Version Path
rails_admin-0.0.1 spec/dummy_app/app/active_record/league.rb
obitum-rails_admin-0.0.5 spec/dummy_app/app/models/league.rb
drewda_rails_admin-0.0.1 spec/dummy_app/app/models/league.rb
obitum-rails_admin-0.0.4 spec/dummy_app/app/models/league.rb
obitum-rails_admin-0.0.3 spec/dummy_app/app/models/league.rb
obitum-rails_admin-0.0.2 spec/dummy_app/app/models/league.rb
obitum-rails_admin-0.0.1 spec/dummy_app/app/models/league.rb
elucid-rails_admin-0.0.1 spec/dummy_app/app/models/league.rb