lib/refinerycms-resources.rb in refinerycms-resources-0.9.9.7 vs lib/refinerycms-resources.rb in refinerycms-resources-0.9.9.8

- old
+ new

@@ -11,9 +11,14 @@ @root ||= Pathname.new(File.expand_path('../../', __FILE__)) end end class Engine < ::Rails::Engine + + initializer "serve static assets" do |app| + app.middleware.insert_after ::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public" + end + initializer 'resources-with-dragonfly' do |app| app_resources = Dragonfly[:resources] app_resources.configure_with(:rails) do |c| c.datastore.root_path = Rails.root.join('public', 'system', 'resources').to_s c.url_path_prefix = '/system/resources'