rails API finally working