Merged updates from trunk into stable branch
[feedcatcher.git] / vendor / rails / activerecord / test / models / ship.rb
1 class Ship < ActiveRecord::Base
2 self.record_timestamps = false
3
4 belongs_to :pirate
5 has_many :parts, :class_name => 'ShipPart', :autosave => true
6
7 accepts_nested_attributes_for :pirate, :allow_destroy => true, :reject_if => proc { |attributes| attributes.empty? }
8
9 validates_presence_of :name
10 end