-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
When providing an object related via a polymoprhic association to #where, the object is not properly converted to an ObjectId in the query.
Rating.where(ratable: movie) => NoMethodError: undefined method `bson_type' for #<Movie _id: 56cf079df1286e1284dcb98b, title: nil>
The criteria looks like:
=> #<Mongoid::Criteria selector: {"ratable_id"=>#<Movie _id: 56cf07ccf1286e1286530b03, title: nil>} options: {} class: Rating embedded: false>
it should have an ObjectId in the selector instead of a movie object.
- is depended on by
-
MONGOID-4244 undefined method `bson_type'
- Closed