trineo/jira-ruby — pull request #28 by oogali (2012-09-08 14:44:08+00:00)
Title: Uploading of attachments...

Here is my not-so-great code to allow you to add attachments to an issue.

I would greatly appreciate feedback on coding style/methodology, because it just doesn't quite feel right to me.

ticket = jira.Issue.find 'DEV-33'
attachment = ticket.attachments.build
attachment.save({
'filename' => 'test.txt',
'content' => '/path/to/file/to/attach',
'type' => 'text/plain'
})