Sha256: 60fc752662f3c094e1080b5c0c0815be22cb3c04a7eca26f348af9e3a8316939

Contents?: true

Size: 482 Bytes

Versions: 32

Compression:

Stored size: 482 Bytes

Contents

# encoding: utf-8
module Mongoid
  # This module is for hooking in to +ActiveModel+s serialization to let
  # configuring the ability to include the root in JSON happen from the Mongoid
  # config.
  module JSON
    extend ActiveSupport::Concern

    # We need to redefine where the JSON configuration is getting defined,
    # similar to +ActiveRecord+.
    included do
      undef_method :include_root_in_json
      delegate :include_root_in_json, to: ::Mongoid
    end
  end
end

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
mongoid-3.1.7 lib/mongoid/json.rb
mongoid-3.1.6 lib/mongoid/json.rb
mongoid-3.1.5 lib/mongoid/json.rb
mongoid-3.1.4 lib/mongoid/json.rb
mongoid-3.1.3 lib/mongoid/json.rb
mongoid-3.1.2 lib/mongoid/json.rb
mongoid-3.0.23 lib/mongoid/json.rb
mongoid-3.1.1 lib/mongoid/json.rb
mongoid-3.1.0 lib/mongoid/json.rb
mongoid-3.0.22 lib/mongoid/json.rb
mongoid-3.0.21 lib/mongoid/json.rb
mongoid-3.0.20 lib/mongoid/json.rb
mongoid-3.0.19 lib/mongoid/json.rb
mongoid-3.0.18 lib/mongoid/json.rb
mongoid-3.0.17 lib/mongoid/json.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/mongoid-3.0.16/lib/mongoid/json.rb
mongoid-3.0.16 lib/mongoid/json.rb
mongoid-3.0.15 lib/mongoid/json.rb
mongoid-3.0.14 lib/mongoid/json.rb
mongoid-3.0.13 lib/mongoid/json.rb