require 'jquery-ui-rails' require 'scrivito_content_browser' module ScrivitoEditors class Engine < ::Rails::Engine isolate_namespace ScrivitoEditors initializer "scrivito_editors.scrivito_tag_helper" do ActionView::Base.send :include, ScrivitoTagHelper end def self.imgly_assets imgly_assets_paths.sort.inject({}) do |asset_map, file| asset_map[file] = yield(file) asset_map end end private_class_method def self.imgly_assets_paths images_path = ScrivitoEditors::Engine.root + 'vendor/assets/images/' absolute_paths = Dir[images_path + 'imgly_sdk/**/*'].select { |f| File.file?(f) } absolute_paths.map do |absolute_path| Pathname.new(absolute_path).relative_path_from(images_path).to_s end end end end