Sha256: fbbda217325c6e8f0c2d38f24b9f252933f86da8c2c8bac7b4adb203b9b4369d
Contents?: true
Size: 841 Bytes
Versions: 3
Compression:
Stored size: 841 Bytes
Contents
class Driver include Ripple::Document property :name, String key_on :name end class Passenger include Ripple::Document property :name, String end class Engine include Ripple::EmbeddedDocument property :displacement, String end class Wheel include Ripple::Document property :diameter, Integer end class Seat include Ripple::EmbeddedDocument property :color, String end class Car include Ripple::Document property :make, String property :model, String one :driver # linked, key_on :name many :passengers # linked, standard :key one :engine # embedded many :seats # embedded many :wheels accepts_nested_attributes_for :driver, :passengers, :engine, :seats accepts_nested_attributes_for :wheels, :reject_if => proc{|attrs| attrs['diameter'] < 12 }, :allow_destroy => true end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
wyngle-ripple-0.1.0 | spec/support/models/car.rb |
ripple-1.0.0.beta2 | spec/support/models/car.rb |
ripple-1.0.0.beta | spec/support/models/car.rb |