blob: 1a633b8d776ffb21fe72753be32d1c6e9ccf6a91 (
plain) (
blame)
1
2
3
4
5
6
7
8
|
class ShipPart < ActiveRecord::Base
belongs_to :ship
has_many :trinkets, class_name: "Treasure", as: :looter
accepts_nested_attributes_for :trinkets, allow_destroy: true
accepts_nested_attributes_for :ship
validates_presence_of :name
end
|