Sha256: 8b4034705db38720cbf319acef1e678f4633415613136882e66a1656346c4d64

Contents?: true

Size: 719 Bytes

Versions: 1

Compression:

Stored size: 719 Bytes

Contents

require 'rails'
require 'ueditor'

module Ueditor
  class Engine < ::Rails::Engine
    isolate_namespace Ueditor

    # config.action_view.javascript_expansions[:ueditor] = "ueditor/ueditor"

    initializer "ueditor.assets_precompile" do |app|
    app.config.assets.precompile += Ueditor.assets
    end

    initializer "ueditor.helpers" do
      ActiveSupport.on_load :action_view do
        ActionView::Base.send(:include, Ueditor::Helpers::FormTagHelper)
        ActionView::Base.send(:include, Ueditor::Helpers::FormHelper)
        ActionView::Helpers::FormBuilder.send(:include, Ueditor::Helpers::FormBuilder)
        ActionView::Base.send(:include, Ueditor::Helpers::AssetTagHelper)
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ueditor-0.0.2 lib/ueditor/engine.rb