Sha256: 21441c087671b88708003d64869cf8b6608c5d1dff1cc664145cbac545c46c75

Contents?: true

Size: 264 Bytes

Versions: 8

Compression:

Stored size: 264 Bytes

Contents

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ibm_db-5.2.0-x86-mingw32 test/models/ship_part.rb
ibm_db-5.1.0-x86-mingw32 test/models/ship_part.rb
ibm_db-5.0.5-x86-mingw32 test/models/ship_part.rb
ibm_db-5.0.4-x86-mingw32 test/models/ship_part.rb
ibm_db-5.0.3-x86-mingw32 test/models/ship_part.rb
ibm_db-5.0.2-x86-mingw32 test/models/ship_part.rb
ibm_db-3.0.5-x86-mingw32 test/models/ship_part.rb
ibm_db-3.0.5 test/models/ship_part.rb