2007-10-26 01:56:46 -04:00
|
|
|
class Treasure < ActiveRecord::Base
|
|
|
|
has_and_belongs_to_many :parrots
|
2016-08-06 13:37:57 -04:00
|
|
|
belongs_to :looter, polymorphic: true
|
2015-04-09 00:53:15 -04:00
|
|
|
# No counter_cache option given
|
2015-01-28 11:36:42 -05:00
|
|
|
belongs_to :ship
|
2008-02-01 22:27:31 -05:00
|
|
|
|
2016-08-06 13:37:57 -04:00
|
|
|
has_many :price_estimates, as: :estimate_of
|
2016-08-06 12:26:20 -04:00
|
|
|
has_and_belongs_to_many :rich_people, join_table: "peoples_treasures", validate: false
|
2009-07-11 08:30:35 -04:00
|
|
|
|
|
|
|
accepts_nested_attributes_for :looter
|
2007-10-26 01:56:46 -04:00
|
|
|
end
|
2012-09-11 14:11:51 -04:00
|
|
|
|
|
|
|
class HiddenTreasure < Treasure
|
|
|
|
end
|