Skip to content

Instantly share code, notes, and snippets.

@mbhnyc
Created May 24, 2012 14:19
Show Gist options
  • Save mbhnyc/2781841 to your computer and use it in GitHub Desktop.
Save mbhnyc/2781841 to your computer and use it in GitHub Desktop.
Scripts in views sample
/ layout (see last line)
!!! 5
-html_tag class: "no-js", lang: "en" do
= render "head", stylesheet_partial: "stylesheets"
%body{ class: "#{controller.controller_name}" }
#wrapper
#main
#footer
= render "footer"
= javascript_include_tag "application"
= airbrake_javascript_notifier
= yield :foot_scripts
/ inside a view
- content_for :foot_scripts do
- render :partial => "moderate_javascript"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment