Skip to content

Instantly share code, notes, and snippets.

@dpawluk
Created August 16, 2016 17:06
Show Gist options
  • Select an option

  • Save dpawluk/4c1866d0ef081d055389d99ea4d527fa to your computer and use it in GitHub Desktop.

Select an option

Save dpawluk/4c1866d0ef081d055389d99ea4d527fa to your computer and use it in GitHub Desktop.
Updating a dropdown for org custom fields with the ruby client
test = client.organization_fields.find(:id => 132127)
old_options = test.custom_field_options
old_options << {"id"=>nil,"name"=>"newname2","value"=>"newvalue2"}
test.custom_field_options = []
test.changed?
#returns true at this point
test.custom_field_options = old_options
test.save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment