Rails code for TDD Data study