Sha256: abdfb90f33b1cca0e74c3fa14963f168857275422237ec15d463c0e02b60e9fe

Contents?: true

Size: 448 Bytes

Versions: 11

Compression:

Stored size: 448 Bytes

Contents

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

11 entries across 11 versions & 2 rubygems

Version Path
ripple-0.9.5 spec/support/models/car.rb
ripple-0.9.3 spec/support/models/car.rb
ripple-0.9.2 spec/support/models/car.rb
ripple-0.9.0 spec/support/models/car.rb
ripple-0.9.0.beta2 spec/support/models/car.rb
ripple-0.9.0.beta spec/support/models/car.rb
ripple-0.8.3 spec/support/models/car.rb
ripple-0.8.2 spec/support/models/car.rb
ripple-0.8.1 spec/support/models/car.rb
ripple-anaf-0.8.0.beta2 spec/support/models/car.rb
ripple-anaf-0.8.0.beta1 spec/support/models/car.rb