undefined rails variable in js