Skip to content

Instantly share code, notes, and snippets.

@kevindjacobson
Created April 25, 2013 00:18
Show Gist options
  • Save kevindjacobson/5456641 to your computer and use it in GitHub Desktop.
Save kevindjacobson/5456641 to your computer and use it in GitHub Desktop.
Unusual behavior in the Zendesk Ruby Api Gem.
>> ticket.changed?
=> false
>> ticket.tags
=> ["account"]
>> ticket.tags += ['updated_by_scribd_loop'] # HERE'S WHERE I ADD THE TAG!
=> ["account", "updated_by_scribd_loop"]
>> ticket.tags
=> ["account", "updated_by_scribd_loop"]
>> ticket.changed? # YEP
=> true
>> ticket.changes
=> #<Hashie::Mash tags=["account", "updated_by_scribd_loop"]> #YEP!
>> ticket.save
=> true
>> ticket.changes #Great! My changes saved!
=> #<Hashie::Mash>
>> ticket.changed?
=> false
>> ticket.tags
=> ["account"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment