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.0.12 lib/mongoid/json.rb
mongoid-3.0.11 lib/mongoid/json.rb
mongoid-3.0.10 lib/mongoid/json.rb
mongoid-3.0.9 lib/mongoid/json.rb
mongoid-3.0.6 lib/mongoid/json.rb
mongoid-3.0.5 lib/mongoid/json.rb
mongoid-3.0.4 lib/mongoid/json.rb
mongoid-3.0.3 lib/mongoid/json.rb
mongoid-3.0.2 lib/mongoid/json.rb
mongoid-3.0.1 lib/mongoid/json.rb
mongoid-3.0.0 lib/mongoid/json.rb
mongoid-3.0.0.rc lib/mongoid/json.rb