File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
lib/active_admin/dragonfly Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 22
33module ActiveAdmin
44 module Dragonfly
5+
56 class Engine < ::Rails ::Engine
7+ initializer "Railsyard precompile hook" , group : :all do |app |
8+ # check if someone already initialized Dragonfly for Rails
9+ unless ActiveRecord ::Base . methods . include? :image_accessor
10+ require 'dragonfly/rails/images'
11+ end
12+ # in any case we add the Dragonfly[:images] app as middleware
13+ app . config . middleware . insert 1 , 'Dragonfly::Middleware' , :images
614
7- initializer "Railsyard precompile hook" do |app |
815 app . config . assets . precompile += [
916 "active_admin/active_admin_dragonfly.js" ,
1017 "active_admin/active_admin_dragonfly.css"
@@ -14,7 +21,7 @@ class Engine < ::Rails::Engine
1421 config . to_prepare do
1522 ActiveAdmin . application . register_stylesheet "active_admin/active_admin_dragonfly.css" , :media => :screen
1623 end
17-
1824 end
25+
1926 end
2027end
You can’t perform that action at this time.
0 commit comments