Skip to content

Instantly share code, notes, and snippets.

@stecb
Created December 13, 2011 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stecb/1471486 to your computer and use it in GitHub Desktop.
Save stecb/1471486 to your computer and use it in GitHub Desktop.
Add specific js inside a page, rails
- #Inside your application (i.e. application.html.haml) layout put this at the end of the body tag
= yield :assets_bottom_body
- #then, inside your specific page (i.e. /foo/bar.html.haml) put
- content_for :assets_bottom_body do
- javascript_include_tag "some_js_file"
- # or something else specific for this page like :javascript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment