Module: Ckeditor::ApplicationHelper

Defined in:
app/helpers/ckeditor/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#assets_pipeline_enabled?Boolean

Returns:

  • (Boolean)


2
3
4
5
6
7
8
9
10
# File 'app/helpers/ckeditor/application_helper.rb', line 2

def assets_pipeline_enabled?
  if Gem::Version.new(::Rails.version.to_s) >= Gem::Version.new('4.0.0')
    defined?(Sprockets::Rails)
  elsif Gem::Version.new(::Rails.version.to_s) >= Gem::Version.new('3.0.0')
    Rails.application.config.assets.enabled
  else
    false
  end
end