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, CmsTagHelper ActionView::Base.send :include, ScrivitoTagHelper end class << self def imgly_assets imgly_assets_paths.inject({}) do |asset_map, file| asset_map[file] = yield(file) asset_map end end private def imgly_assets_paths images_path = ScrivitoEditors::Engine.root + 'app/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 end