Skip to content

Instantly share code, notes, and snippets.

@jamesfwz
Created July 15, 2014 09:57
Show Gist options
  • Save jamesfwz/4a806481ab8fcf42934c to your computer and use it in GitHub Desktop.
Save jamesfwz/4a806481ab8fcf42934c to your computer and use it in GitHub Desktop.
ckeditor
/lib/tasks/ckeditor.rake
require 'fileutils'
desc "Create nondigest versions of all ckeditor digest assets"
task "assets:precompile" do
fingerprint = /\-[0-9a-f]{32}\./
for file in Dir["public/assets/ckeditor/**/*"]
next unless file =~ fingerprint
nondigest = file.sub fingerprint, '.'
FileUtils.cp file, nondigest, verbose: true
end
end
application.rb
config.assets.precompile += Ckeditor.assets
config.assets.precompile += %w(ckeditor/*)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment