Skip to content
Create a gist now

Instantly share code, notes, and snippets.

I'm looking for ideas to refactor the below code into something more understandable and less error prone and ugly. Some pages in the application need one off java script included to make a feature work, but it is silly to run the java script on every other page. Any ideas?
<!DOCTYPE html>
<html lang="en">
$(function() {
<%= yield(:js) %>
content_for :js do

Sorry about the tab/spacing in application.html.erb... I did not paste it in like that, but the github editor refuses to save it correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.