pirate.rb 255 字节
Newer Older
1 2 3
class Pirate < ActiveRecord::Base
  belongs_to :parrot
  has_and_belongs_to_many :parrots
4 5 6
  has_many :treasures, :as => :looter

  has_many :treasure_estimates, :through => :treasures, :source => :price_estimates
7 8

  validates_presence_of :catchphrase
9
end