tied ruby to javascript