Single page web application using angularJs on front-side and rails on backend