Merge pull request #13 from sanemat/multi-json-in-rails-case
Compatible multi_json >= 1.0.0 with Rails3.2.8
This commit is contained in:
commit
8c2b734ef1
|
@ -1,6 +1,9 @@
|
|||
require 'multi_json'
|
||||
|
||||
if !MultiJson.respond_to?(:load) || MultiJson.method(:load).owner == Kernel
|
||||
if !MultiJson.respond_to?(:load) || [
|
||||
Kernel,
|
||||
defined?(ActiveSupport::Dependencies::Loadable) && ActiveSupport::Dependencies::Loadable
|
||||
].compact.include?(MultiJson.method(:load).owner)
|
||||
module MultiJson
|
||||
class <<self
|
||||
alias :load :decode
|
||||
|
|
Loading…
Reference in New Issue