1
class Ship < ActiveRecord::Base
2
self.record_timestamps = false
5
has_many :parts, :class_name => 'ShipPart', :autosave => true
7
accepts_nested_attributes_for :pirate, :allow_destroy => true, :reject_if => proc { |attributes| attributes.empty? }
9
validates_presence_of :name