Guest User

Untitled

a guest
Jan 19th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. config.assets.precompile += %w( pagespecific.js anotherpage.js )
  2.  
  3. config.assets.precompile += ['directory/*']
  4.  
  5. # In production.rb
  6. config.assets.precompile << Proc.new { |path|
  7. if path =~ /.(css|js)z/
  8. full_path = Rails.application.assets.resolve(path).to_path
  9. app_assets_path = Rails.root.join('app', 'assets').to_path
  10. if full_path.starts_with? app_assets_path
  11. puts "excluding asset: " + full_path
  12. false
  13. else
  14. puts "including asset: " + full_path
  15. true
  16. end
  17. else
  18. false
  19. end
  20. }
  21.  
  22. //= require_directory ./awesome_js_app
  23.  
  24. config.assets.precompile += %w( public.css public.js )
Add Comment
Please, Sign In to add comment