File: ship_part.rb

package info (click to toggle)
ruby-activerecord-2.3 2.3.14-6
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,180 kB
  • sloc: ruby: 32,874; makefile: 7
file content (7 lines) | stat: -rw-r--r-- 221 bytes parent folder | download
1
2
3
4
5
6
7
class ShipPart < ActiveRecord::Base
  belongs_to :ship
  has_many :trinkets, :class_name => "Treasure", :as => :looter
  accepts_nested_attributes_for :trinkets, :allow_destroy => true
  
  validates_presence_of :name
end