My Little Diary

Funny things that happen when you write code

Mongoid Default Fields Can Give You Hard Time

So I was coding peacefully when our product owner was doing some tests on the new features we implemented over that past two weeks. He pulls, bundles, runs the server and goes to the index route only to find the cheerful an empty page. “Where are my previous records?” he might have thought, “I didn’t drop the db”. He’s of a good technical expierence so he fires up Rails console to inspect this issue; one command, press Enter, and Voila, the documents are there!