Sha256: b8f2b5fb686bc3b24efea28c33832cd936937a8cf1b585af06c12d3a3fff5d49

Contents?: true

Size: 388 Bytes

Versions: 28

Compression:

Stored size: 388 Bytes

Contents

$:.push 'examples'; require 'helper'

class Billing < RestModel
  property :login
  belongs_to :customer
end

class Customer < RestModel
  id field: :customer_id, type: Integer
  property :login
  has_one :billing
end

@root = Customer.from_source!(customer_id: 123, login: 'jackiechan2010').first
@root.update_attributes(billing: {login: "new_billing_login"})

inspect_rest_model(@root)

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
rest_model-0.3.1 examples/update_attributes/has_one.rb
rest_model-0.3.0 examples/update_attributes/has_one.rb
rest_model-0.2.3 examples/update_attributes/has_one.rb
rest_model-0.2.1 examples/update_attributes/has_one.rb
rest_model-0.2.0 examples/update_attributes/has_one.rb
rest_model-0.1.24 examples/update_attributes/has_one.rb
rest_model-0.1.23 examples/update_attributes/has_one.rb
rest_model-0.1.22 examples/update_attributes/has_one.rb
rest_model-0.1.21 examples/update_attributes/has_one.rb
rest_model-0.1.20 examples/update_attributes/has_one.rb
rest_model-0.1.19 examples/update_attributes/has_one.rb
rest_model-0.1.18 examples/update_attributes/has_one.rb
rest_model-0.1.17 examples/update_attributes/has_one.rb
rest_model-0.1.16 examples/update_attributes/has_one.rb
rest_model-0.1.15 examples/update_attributes/has_one.rb
rest_model-0.1.14 examples/update_attributes/has_one.rb
rest_model-0.1.13 examples/update_attributes/has_one.rb
rest_model-0.1.12 examples/update_attributes/has_one.rb
rest_model-0.1.11 examples/update_attributes/has_one.rb
rest_model-0.1.10 examples/update_attributes/has_one.rb