Sha256: 8b0f0dbdf73cc86900ecd00d2c05dfca42aa511eac31c5720c6f5473674ea478

Contents?: true

Size: 834 Bytes

Versions: 158

Compression:

Stored size: 834 Bytes

Contents

#
# 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:
# https://github.com/rails/sprockets-rails/blob/master/lib/sprockets/rails/environment.rb
#
module TinyMCE::Rails::Environment
  def path_fingerprint(path)
    fingerprint = super
    return fingerprint if fingerprint
    return "" if path =~ /^tinymce\//
  end
end

Sprockets::Rails::Environment.class_eval do
  include TinyMCE::Rails::Environment
end

Version data entries

158 entries across 158 versions & 3 rubygems

Version Path
tinymce-rails-7.5.1 lib/tinymce/rails/environment.rb
tinymce-rails-7.5.0 lib/tinymce/rails/environment.rb
tinymce-rails-6.8.5 lib/tinymce/rails/environment.rb
tinymce-rails-7.4.1 lib/tinymce/rails/environment.rb
tinymce-rails-7.4.0 lib/tinymce/rails/environment.rb
tinymce-rails-7.3.0 lib/tinymce/rails/environment.rb
tinymce-rails-7.2.1 lib/tinymce/rails/environment.rb
tinymce-rails-6.8.4 lib/tinymce/rails/environment.rb
tinymce-rails-7.2.0 lib/tinymce/rails/environment.rb
tinymce-rails-7.1.2.1 lib/tinymce/rails/environment.rb
tinymce-rails-7.1.2 lib/tinymce/rails/environment.rb
tinymce-rails-7.0.1 lib/tinymce/rails/environment.rb
tinymce-rails-7.0.0.1 lib/tinymce/rails/environment.rb
tinymce-rails-6.8.3 lib/tinymce/rails/environment.rb
tinymce-rails-6.8.2 lib/tinymce/rails/environment.rb
tinymce-rails-6.8.1 lib/tinymce/rails/environment.rb
tinymce-rails-6.8.0 lib/tinymce/rails/environment.rb
tinymce-rails-5.10.9 lib/tinymce/rails/environment.rb
tinymce-rails-6.7.2 lib/tinymce/rails/environment.rb
tinymce-rails-6.7.1 lib/tinymce/rails/environment.rb