Permalink
Browse files

Merge pull request #13 from sanemat/multi-json-in-rails-case

Compatible multi_json >= 1.0.0 with Rails3.2.8
  • Loading branch information...
2 parents 40cbcd8 + 6e40390 commit 8c2b734ef1b597a3df3da34ee9e4cca4d7dd2662 @sqrrrl sqrrrl committed Dec 30, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/compat/multi_json.rb
View
@@ -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

0 comments on commit 8c2b734

Please sign in to comment.