gamache / hyperresource

A self-inflating Ruby client for hypermedia APIs. Not under active development.
http://hyperresource.com/doc
MIT License
304 stars 29 forks source link

Updating a resource's attributes does not work at all. #31

Open ghost opened 10 years ago

ghost commented 10 years ago
2.1.2 :025 > api.transactions[1].description = 'foo'
 => "foo" 
2.1.2 :026 > api.transactions[1].changed?
 => false 
2.1.2 :027 > api.transactions[1].attributes
 => {"id"=>2, "description"=>"example", "amount"=>"0.1235E2", "credit_account_name"=>"debtor", "debit_account_name"=>"savings", "date"=>"2000-06-12 00:00:00 +0200"} 
2.1.2 :028 > api.transactions[1].attributes["description"] = 'foo'
 => "foo" 
2.1.2 :029 > api.transactions[1].attributes
 => {"id"=>2, "description"=>"example", "amount"=>"0.1235E2", "credit_account_name"=>"debtor", "debit_account_name"=>"savings", "date"=>"2000-06-12 00:00:00 +0200"} 
2.1.2 :030 > api.transactions[1].changed?
 => false 
2.1.2 :031 > api.transactions[1].description
 => "example" 

Changing attributes does not work like I would expect it to.