ruby - Can you inject javascript into an ERB file? -
i working on ruby sinatra app , wanted know if possible inject javascript @ end of 1 erb files routes.rb file. have seen ruby gems before haven't been able find way this.
any appreciated.
alex
you can inject javascript in .erb files this:
<script> $(document).ready(function() { alert('hello world!'); }); </script>
Comments
Post a Comment