hyperresource
hyperresource copied to clipboard
'name' property lost
Given the following node:
{
"name": "foo"
}
#<HyperResource::Link:0x007f8d8644b978
@base_href="/api/nodes/e22d486a-f2cc-4ecf-8659-617cd80cf41f",
@default_method="get",
@name=nil,
@params={},
@resource=
#<HyperResource:0x3fc6c32651dc @root="http://trowel.dev/api" @href="/api/nodes" @loaded=true @namespace=nil ...>,
@templated=false>
node.name and node['name'] both return nil
Just repeating what you mentioned to me earlier - you can obtain the value that you assigned to the name field through node.attributes['name'].
That's correct, I think it might be worth changing the name to @_name, Rspec approaches it this way I think.