Restclient PUT changes

Hi

I can make changes using the following curl script:

#! /bin/sh

··· #

USER="bstanding"
PASS="test1234"
FOREMAN_URL=“https://foreman.prod.marinsw.net"
NAME=$1
curl -s -k --user $USER:$PASS -H “Accept:application/json” -H
"X-HTTP-Method-Override: PUT”
-d “host[puppet_ca_proxy_id]=2” $FOREMAN_URL/hosts/$NAME

However trying use the Ruby equiv I get back a response without changes:

JSON.parse(RestClient::Request.new({:method => :put,
:url =>
"#{@foreman_url}/#{path.to_s}/#{nextpath.to_s}",
:user => @foreman_user, :password
=> @foreman_pass,
:“puppet_proxy_id” => 8, #Also tried
:host => {“puppet_proxy_id” => 8}.to_json
:headers => { :accept => :json,
:content_type => :json }}.merge(options)).execute.to_s)
end

Do I have the correct headers? What else could I be doing wrong?

Example json output:
{
“host”: {
“puppet_ca_proxy_id”: 2,
“puppet_proxy_id”: 8,
}
}