Permalink
Browse files

Merge pull request #30 from 83bits/master

Updated the location of "include_root_in_json" for mongoid > 3.0
  • Loading branch information...
2 parents e934f68 + 413a819 commit acc46f4b8dee4a717ee37a402ee4f1dfcb5fe322 @janv committed Jul 25, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/rest_in_place.rb
@@ -7,7 +7,11 @@ class Engine < Rails::Engine
def self.include_root_in_json?
if defined?(Mongoid)
- Mongoid.config.include_root_in_json
+ if defined? Mongoid::Config
+ Mongoid::Config.include_root_in_json
+ else
+ Mongoid.config.include_root_in_json
+ end
elsif defined?(ActiveRecord)
ActiveRecord::Base.include_root_in_json
else

0 comments on commit acc46f4

Please sign in to comment.