Skip to content

Instantly share code, notes, and snippets.

@tka
Created August 13, 2013 17:08
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 tka/6223322 to your computer and use it in GitHub Desktop.
Save tka/6223322 to your computer and use it in GitHub Desktop.
config.assets.precompile << Proc.new { |path|
if path =~ /\.(css|js)\z/ && !( File.basename(path) =~ /^\_/ )
full_path = Rails.application.assets.resolve(path).to_path
app_assets_path = Rails.root.join('app', 'assets').to_path
if full_path.starts_with? app_assets_path
puts "including asset: " + full_path
true
else
puts "excluding asset: " + full_path
false
end
else
false
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment