Created
August 16, 2016 17:06
-
-
Save dpawluk/4c1866d0ef081d055389d99ea4d527fa to your computer and use it in GitHub Desktop.
Updating a dropdown for org custom fields with the ruby client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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