aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/test/models/club.rb
blob: 6e7cdd643ae6f04b06cfb583bbbab93ee1fd7e36 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12



                                             

                                                                                                    





                                                                  
  
class Club < ActiveRecord::Base
  has_many :memberships
  has_many :members, :through => :memberships
  has_many :current_memberships
  has_one :sponsor
  has_one :sponsored_member, :through => :sponsor, :source => :sponsorable, :source_type => "Member"

  private

  def private_method
    "I'm sorry sir, this is a *private* club, not a *pirate* club"
  end
end