use erb embedded javascript file and javascript made accessible