Skip to content

Instantly share code, notes, and snippets.

@shamil
Forked from iwinux/gist:1529093
Created July 19, 2012 03:20
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 shamil/3140541 to your computer and use it in GitHub Desktop.
Save shamil/3140541 to your computer and use it in GitHub Desktop.
config.assets.precompile
def compile_asset?(path)
# ignores any filename that begins with '_' (e.g. sass partials)
# all other css/js/sass/image files are processed
if File.basename(path) =~ /^[^_].*\.\w+$/
puts "Compiling: #{path}"
true
else
puts "Ignoring: #{path}"
false
end
end
config.assets.precompile = [ method(:compile_asset?).to_proc ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment