File tree Expand file tree Collapse file tree 1 file changed +8
-20
lines changed
lib/active_admin/sortable_tree Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Original file line number Diff line number Diff line change 1- require 'activeadmin'
2- require "rubygems"
1+ require "activeadmin"
32
43module ActiveAdmin
54 module SortableTree
65 class Engine < ::Rails ::Engine
7- engine_name ' active_admin-sortable_tree'
6+ engine_name " active_admin-sortable_tree"
87
9-
10- def jquery_ui_six?
11- Gem ::Version . new ( Jquery ::Ui ::Rails ::VERSION ) >= Gem ::Version . new ( "6.0.0" )
12- end
13-
14- def sortable_js
15- if jquery_ui_six?
8+ initializer "active_admin-sortable_tree.precompile" , group : :all do |app |
9+ app . config . assets . precompile += [
10+ "active_admin/sortable.css" ,
1611 "active_admin/sortable.js"
17- else
18- "active_admin/sortable_ui5.js"
19- end
20- end
21-
22- initializer "Rails precompile hook" , group : :all do |app |
23- app . config . assets . precompile += [ "active_admin/sortable.css" ,
24- sortable_js ]
12+ ]
2513 end
2614
27- initializer "add assets " do
15+ initializer "active_admin-sortable_tree.register_assets " do
2816 ActiveAdmin . application . register_stylesheet "active_admin/sortable.css"
29- ActiveAdmin . application . register_javascript sortable_js
17+ ActiveAdmin . application . register_javascript "active_admin/sortable.js"
3018 end
3119 end
3220 end
You can’t perform that action at this time.
0 commit comments