Created
July 9, 2013 18:28
-
-
Save rymawby/5959875 to your computer and use it in GitHub Desktop.
Setting javascript within erb files (rails).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%= javascript_tag do %> | |
| window.variable_name = <%=j rails_var %>; | |
| <% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment