Created
April 24, 2012 19:51
-
-
Save jancel/2483107 to your computer and use it in GitHub Desktop.
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
#config/production.rb (line 1) | |
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 | |
# within the config block, I use this | |
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