i finally have a understanding of using js with ruby, i fixed the bug, gave me insite.