10000 automatically set precompile assets · parse/activeadmin@04f6e25 · GitHub
[go: up one dir, main page]

Skip to content

Commit 04f6e25

Browse files
committed
automatically set precompile assets
backport of activeadmin#3489
1 parent b41450a commit 04f6e25

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/active_admin/engine.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ module ActiveAdmin
22
class Engine < ::Rails::Engine
33
if Rails.version > "3.1"
44
initializer "ActiveAdmin precompile hook", :group => :all do |app|
5-
app.config.assets.precompile += %w(active_admin.js active_admin.css active_admin/print.css)
5+
ActiveAdmin.application.stylesheets.each do |path, _|
6+
app.config.assets.precompile << path
7+
end
8+
ActiveAdmin.application.javascripts.each do |path|
9+
app.config.assets.precompile << path
10+
end
611
end
712
end
813
end

0 commit comments

Comments
 (0)
0