Sha256: 34c5119218751278000a97c83a975551382c1f69ac5d029f6e7c5af0028942c8
Contents?: true
Size: 900 Bytes
Versions: 3
Compression:
Stored size: 900 Bytes
Contents
require 'ckeditor-rails/asset_url_processor' module Ckeditor module Rails class Engine < ::Rails::Engine initializer 'ckeditor.assets.precompile', group: :all do |app| app.config.assets.precompile += Ckeditor::Rails::Asset.new.files end # Follow sprockets-rails 3.3.0+ to use postprocessor of Sprockets # https://github.com/rails/sprockets-rails/blob/v3.3.0/lib/sprockets/railtie.rb#L121 initializer 'ckeditor.asset_url_processor' do |app| # Processors of Sprockets 2.x should inherit from Tilt::Template # Processors of Sprockets 3+ should respond to :call if Gem::Version.new(::Sprockets::VERSION) > Gem::Version.new('3') ::Sprockets.register_postprocessor 'text/css', ::Ckeditor::Rails::AssetUrlProcessor end end rake_tasks do load "ckeditor-rails/tasks.rake" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ckeditor_rails-4.17.0 | lib/ckeditor-rails/engine.rb |
ckeditor_rails-4.16.3 | lib/ckeditor-rails/engine.rb |
ckeditor_rails-4.16.2 | lib/ckeditor-rails/engine.rb |