reference for js, rails and ruby