Compatible multi_json >= 1.0.0 with Rails3.2.8

This commit is contained in:
sanemat 2012-10-11 02:51:34 +09:00
parent 0903702738
commit 92a074bc18
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
gem 'multi_json', '>= 1.0.0'
require 'multi_json'
if !MultiJson.respond_to?(:load) || MultiJson.method(:load).owner == Kernel
if !MultiJson.respond_to?(:load) || [Kernel, ActiveSupport::Dependencies::Loadable].include?(MultiJson.method(:load).owner)
module MultiJson
class <<self
alias :load :decode