2008-05-18 06:22:34 +02:00
|
|
|
class Pirate < ActiveRecord::Base
|
|
|
|
belongs_to :parrot
|
|
|
|
has_and_belongs_to_many :parrots
|
|
|
|
has_many :treasures, :as => :looter
|
|
|
|
|
|
|
|
has_many :treasure_estimates, :through => :treasures, :source => :price_estimates
|
2008-06-02 08:35:38 +02:00
|
|
|
|
|
|
|
validates_presence_of :catchphrase
|
2008-05-18 06:22:34 +02:00
|
|
|
end
|