trying to write a basic blog backend in rails