Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ For guidance and usage examples, visit:
http://forge.kayako.com/projects/kayako-ruby-api-library

For help and support from the Kayako developer community, visit:
http://forums.kayako.com/
http://forums.kayako.com/


In this there is some major changes related to download of attachment.
It is compatible with ruby 1.9.x.

As in higher version of ruby there is a support for encodings this issue has been solved in this commit.
3 changes: 2 additions & 1 deletion lib/kayako_client/mixins/attachment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def file
@file
elsif contents
raise RuntimeError, "not a remote file" unless id && !new?
@file = Tempfile.new(file_name.split('.').first || 'kayako_attachment')
@file = Tempfile.new([file_name.split('.').first || 'kayako_attachment', "."+file_name.split('.').last])
@file.binmode
@file.write(contents)
@file.flush
@file.rewind
Expand Down
2 changes: 1 addition & 1 deletion lib/kayako_client/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class User < KayakoClient::Base
property :enable_dst, :boolean
property :sla_plan_id, :integer
property :sla_plan_expiry, :date
property :password, :string, :new => true, :required => :post
property :password, :string, :required => :post
property :send_welcome_email, :boolean, :new => true

associate :user_group, :user_group_id, UserGroup
Expand Down