8000 make nodigest copy · udacity/activeadmin_json_editor@29b1466 · GitHub
[go: up one dir, main page]

Skip to content

Commit 29b1466

Browse files
author
wild
committed
make nodigest copy
1 parent 0916334 commit 29b1466

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/activeadmin/hstore_editor.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55
module ActiveAdmin
66
module HstoreEditor
77
class Engine < ::Rails::Engine
8+
config.assets.precompile += %w[img/jsoneditor-icons.png]
9+
10+
rake_tasks do
11+
task 'assets:precompile' do
12+
fingerprint = /\-[0-9a-f]{32}\./
13+
Dir['public/assets/img/jsoneditor-icons-*'].each do |file|
14+
next unless file =~ fingerprint
15+
nondigest = file.sub fingerprint, '.'
16+
FileUtils.cp file, nondigest, verbose: true
17+
end
18+
end
19+
end
820
end
921
end
1022
end

0 commit comments

Comments
 (0)
0