Added methods to call js to ruby controller.