Module: TinyMCE::Rails::Environment

Defined in:
lib/tinymce/rails/environment.rb

Overview

Rails 4.2 and sprockets-rails 3.0.0 introduces behaviour whereby asset digests are enabled by default in development mode and any requests to undigested assets raise a NoDigestError.

Since tinymce-rails uses undigested assets for dynamically loaded TinyMCE assets, we need to bypass this behaviour by returning an empty fingerprint for assets beneath tinymce/ that don't already have one.

This module extends the Sprockets::Rails::Environment class defined at: github.com/rails/sprockets-rails/blob/master/lib/sprockets/rails/environment.rb

Instance Method Summary collapse

Instance Method Details

#path_fingerprint(path) ⇒ Object


14
15
16
17
18
# File 'lib/tinymce/rails/environment.rb', line 14

def path_fingerprint(path)
  fingerprint = super
  return fingerprint if fingerprint
  return "" if path =~ /^tinymce\//
end