Skip to content

Commit

Permalink
Fix incompatibility with bson gem 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed May 19, 2024
1 parent c23bc98 commit 4e9366f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/rails_admin/adapters/mongoid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def get(id, scope = scoped)
Mongoid::Errors::InvalidFind
Moped::Errors::InvalidObjectId
BSON::InvalidObjectId
BSON::Error::InvalidObjectId
].exclude?(e.class.to_s)
end

Expand Down
1 change: 1 addition & 0 deletions lib/rails_admin/adapters/mongoid/bson.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def parse_object_id(value)
Moped::Errors::InvalidObjectId
BSON::ObjectId::Invalid
BSON::InvalidObjectId
BSON::Error::InvalidObjectId
].exclude?(e.class.to_s)
end
end
Expand Down

0 comments on commit 4e9366f

Please sign in to comment.