Sha256: b139447dfa6331f1337b45ca66593b8da49cb01639d96365132b9738ea1eda08

Contents?: true

Size: 280 Bytes

Versions: 6

Compression:

Stored size: 280 Bytes

Contents

# frozen_string_literal: true

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

6 entries across 6 versions & 2 rubygems

Version Path
ibm_db-5.5.0 test/models/ship_part.rb
ibm_db-5.4.1 test/models/ship_part.rb
ibm_db-5.4.0 test/models/ship_part.rb
ibm_db-5.3.2 test/models/ship_part.rb
ibm_db-5.3.1 test/models/ship_part.rb
ruby-on-quails-0.1.0 activerecord/test/models/ship_part.rb