created ruby code to output the all todos in index