API-JSON with Rails4.1.7(back-end) and AngularJS(front-end)