mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
b439d85a19
Signed-off-by: José Valim <jose.valim@gmail.com>
7 lines
No EOL
219 B
Ruby
7 lines
No EOL
219 B
Ruby
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 |