Skip to content

Commit 4e9366f

Browse files
committed
Fix incompatibility with bson gem 5.0.0
1 parent c23bc98 commit 4e9366f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/rails_admin/adapters/mongoid.rb

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def get(id, scope = scoped)
3131
Mongoid::Errors::InvalidFind
3232
Moped::Errors::InvalidObjectId
3333
BSON::InvalidObjectId
34+
BSON::Error::InvalidObjectId
3435
].exclude?(e.class.to_s)
3536
end
3637

lib/rails_admin/adapters/mongoid/bson.rb

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def parse_object_id(value)
2121
Moped::Errors::InvalidObjectId
2222
BSON::ObjectId::Invalid
2323
BSON::InvalidObjectId
24+
BSON::Error::InvalidObjectId
2425
].exclude?(e.class.to_s)
2526
end
2627
end

0 commit comments

Comments
 (0)