Sha256: a875f967ff5cd434275fe3812c3133704a4f06ad5e9963a21ff5acf94a1303d9

Contents?: true

Size: 703 Bytes

Versions: 8

Compression:

Stored size: 703 Bytes

Contents

module Ckeditor
  class Engine < ::Rails::Engine
    initializer "ckeditor_engine.add_middleware" do |app|
      app.middleware.insert_before(
        ActionDispatch::Cookies,
        "Ckeditor::Middleware",
        app.config.send(:session_options)[:key])
    end

    config.after_initialize do
      ActionView::Base.send :include, Ckeditor::ViewHelper
      ActionView::Helpers::FormBuilder.send :include, Ckeditor::FormBuilder
      
      ActionView::Helpers::AssetTagHelper.register_javascript_expansion :ckeditor => ["ckeditor/ckeditor"]
      
      if Object.const_defined?("Formtastic")
        Formtastic::SemanticFormHelper.builder = Ckeditor::CustomFormBuilder
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
dust-ckeditor-3.5.0 lib/ckeditor/engine.rb
hifi-ckeditor-3.5.2 lib/ckeditor/engine.rb
hifi-ckeditor-3.5.1 lib/ckeditor/engine.rb
ckeditor-3.5.0 lib/ckeditor/engine.rb
ckeditor-3.4.3.pre lib/ckeditor/engine.rb
ckeditor-3.4.2.pre lib/ckeditor/engine.rb
ckeditor-3.4.1.pre lib/ckeditor/engine.rb
ckeditor-3.4.0.pre lib/ckeditor/engine.rb