Ruby Remove Element From Array Javascript Pushstate