Created
April 26, 2014 05:01
-
-
Save tulios/11312128 to your computer and use it in GitHub Desktop.
asset_pipeline_force_debug_false_only_some_manifest
This file contains 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
# Helper that use the same logic as javascript_include_tag ensuring body=0 for the manifests | |
# Usage: <%= always_no_debug_javascript_include_tag 'manifest' %> | |
# | |
def always_no_debug_javascript_include_tag *sources | |
options = sources.extract_options!.stringify_keys | |
path_options = options.extract!('protocol').symbolize_keys | |
sources.uniq.map {|source| | |
path = path_to_javascript(source, path_options) | |
path.gsub!(/\?body=1/, "?body=0") if path =~ /\?body=1$/ | |
content_tag(:script, "", {"src" => path}.merge!(options)) | |
}.join("\n").html_safe | |
end |
This file contains 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
//= require jquery | |
// | |
//= require scope_pre | |
//= require some_js_1 | |
//= require some_js_2 | |
//= require some_js_3 | |
//= require some_js_4 | |
//= require scope_pos |
This file contains 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
})(jQuery.noConflict(true)); |
This file contains 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
(function($) {//; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment