Skip to content

Commit

Permalink
Fixed unicode characters not being pushed - Rails 3 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
hackedunit committed Mar 26, 2011
1 parent e6e3556 commit 1dc33f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/apn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
require 'resque/plugins/access_worker_from_job'
require 'resque/hooks/before_unregister_worker'
require 'json'
require 'active_support'

require 'apn/queue_name'
require 'apn/queue_manager'
Expand Down
2 changes: 1 addition & 1 deletion lib/apn/notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def packaged_message
hsh['aps']['sound'] = sound.is_a?(TrueClass) ? 'default' : sound.to_s
end
hsh.merge!(opts)
hsh.to_json
ActiveSupport::JSON::encode(hsh)
end

# Symbolize keys, using ActiveSupport if available
Expand Down

0 comments on commit 1dc33f1

Please sign in to comment.