We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaa6d26 commit e8aae88Copy full SHA for e8aae88
lib/mongoid/extensions.rb
@@ -1,11 +1,5 @@
1
# frozen_string_literal: true
2
3
-class BSON::ObjectId
4
- def as_json(options = nil)
5
- { "$oid" => to_s }
6
- end
7
-end
8
-
9
class BSON::Document
10
# We need to override this as ActiveSupport creates a new Object, instead of a new Hash
11
# see https://github.com/rails/rails/commit/f1bad130d0c9bd77c94e43b696adca56c46a66aa
spec/mongoid/extensions_spec.rb
@@ -2,20 +2,6 @@
require "spec_helper"
-describe BSON::ObjectId do
- describe "#as_json" do
- let(:object_id) do
- described_class.new
12
13
- it "returns the $oid plus string" do
14
- expect(object_id.as_json).to eq("$oid" => object_id.to_s)
15
16
17
18
19
describe BSON::Document do
20
21
describe "#symbolize_keys" do
0 commit comments