~michaelforrest/use-case-mapper/trunk

« back to all changes in this revision

Viewing changes to vendor/rails/activerecord/test/models/ship.rb

  • Committer: Richard Lee (Canonical)
  • Date: 2010-10-15 15:17:58 UTC
  • mfrom: (190.1.3 use-case-mapper)
  • Revision ID: richard.lee@canonical.com-20101015151758-wcvmfxrexsongf9d
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
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