Todo app with api in rails