converting js code to ruby, to be able to use digest_path on assets
converting js code to ruby, to be able to use digest_path on assets
fixing permission problem on form create