2012-08-30 09:15:59 +00:00
|
|
|
gem 'multi_json', '>= 1.0.0'
|
|
|
|
require 'multi_json'
|
|
|
|
|
2012-10-10 17:51:34 +00:00
|
|
|
if !MultiJson.respond_to?(:load) || [Kernel, ActiveSupport::Dependencies::Loadable].include?(MultiJson.method(:load).owner)
|
2012-08-30 09:15:59 +00:00
|
|
|
module MultiJson
|
|
|
|
class <<self
|
|
|
|
alias :load :decode
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2012-10-08 14:06:08 +00:00
|
|
|
if !MultiJson.respond_to?(:dump)
|
2012-08-30 09:15:59 +00:00
|
|
|
module MultiJson
|
|
|
|
class <<self
|
|
|
|
alias :dump :encode
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|