Added ajax and rails post