Skip to content

Instantly share code, notes, and snippets.

@zmajstor
Created November 2, 2013 13:38
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 zmajstor/7278969 to your computer and use it in GitHub Desktop.
Save zmajstor/7278969 to your computer and use it in GitHub Desktop.
conditional include of css, js based on controller (previously disable require_tree . in application.css/js)
<% if current_page?(controller: 'foo_bar') %>
<%= stylesheet_link_tag "foo", media: "all" %>
<%= javascript_include_tag "bar" %>
<% end %>
@zmajstor
Copy link
Author

zmajstor commented Nov 2, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment