mirror of
https://github.com/awesome-print/awesome_print
synced 2023-03-27 23:22:34 -04:00
Fixed incompatibility with mongoid4
This commit is contained in:
parent
929ec31ced
commit
30c61256e3
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ module AwesomePrint
|
|||
cast = :mongoid_class
|
||||
elsif object.class.ancestors.include?(::Mongoid::Document)
|
||||
cast = :mongoid_document
|
||||
elsif (defined?(::BSON) && object.is_a?(::BSON::ObjectId)) || (defined?(::Moped) && defined?(::Moped::BSON) && object.is_a?(::Moped::BSON::ObjectId))
|
||||
elsif (defined?(::BSON) && object.is_a?(::BSON::ObjectId)) || (defined?(::Moped::BSON) && object.is_a?(::Moped::BSON::ObjectId))
|
||||
cast = :mongoid_bson_id
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue