fixed rails.js issue