Skip to content

Instantly share code, notes, and snippets.

@everaldo
Created August 10, 2013 05:14
Show Gist options
  • Save everaldo/6199153 to your computer and use it in GitHub Desktop.
Save everaldo/6199153 to your computer and use it in GitHub Desktop.
# Put that on config/environments/production.rb
config.assets.precompile << lambda do |path|
if path =~ /\.(css|js)\z/
full_path = Rails.application.assets.resolve(path).to_path
app_assets_path = Rails.root.join('app', 'assets').to_path
return true if full_path.starts_with? app_assets_path
end
false
end
@everaldo
Copy link
Author

Remember to remove:

//= require_tree . # from application.js
and

*= require_tree . # from application.css

Require manually each file need in the manifests.

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