My first successful attempt to connect a rails api to angularjs