fixes in rails scrpt; added code-history.js