Closed nikolajsen closed 12 years ago
Still not _awesome printing_ on my Mongoid
app.
ruby >> ap Tournament.limit(2).all
#<Mongoid::Criteria
selector: {}
options: {:limit=>2}
class: Tournament
embedded: false>
and
ruby >> ap Tournament.limit(2).all.to_a
[
[0] #<Tournament _id: 54604892416972aa89010000, created_at: 2014-11-10 05:09:38 UTC, updated_at: 2014-11-10 05:15:06 UTC, title: "TT1", type: "Arma 3", description: "", rules: "", prize: "1", max_participants: nil, date: 2014-11-20 00:00:00 UTC, time: "4:56am", time_zone: "Pacific Time (US & Canada)", start: true, casual_players: [], tournament_type: "Open", tournament_mode: "Casual", tournament_bracket: "Single Elimination", player_id: BSON::ObjectId('546042d4416972aa83320000')>,
[1] #<Tournament _id: 546c481d416972f6f1050000, created_at: 2014-11-19 07:34:53 UTC, updated_at: 2014-11-19 07:36:04 UTC, title: "Dota", type: "Dota 2", description: "", rules: "", prize: "1", max_participants: nil, date: 2014-11-20 00:00:00 UTC, time: "1:00am", time_zone: "Arizona", start: true, casual_players: [], tournament_type: "Open", tournament_mode: "Casual", tournament_bracket: "Single Elimination", player_id: BSON::ObjectId('546042d4416972aa83320000')>
]
BTW I'm using ruby 2.0
with rails 4.0
and mongoid 4.0
.
Upgrading from Mongoid 2 to Mongoid 3 I realized the awesome_print gem depended on the bson gem. Mongoid 3 uses the Moped driver instead of the Mongo driver, and BSON references should be changed to Moped::BSON. Tests should be fixed also...