spohlenz / tinymce-rails

Integration of TinyMCE with the Rails asset pipeline
Other
816 stars 258 forks source link

Fingerprint of nested assets #88

Closed pcasaretto closed 11 years ago

pcasaretto commented 11 years ago

Hey,

From what I understand the nested assets (e.g. tiny_mce_popup.js) get copied over "manually" on assets which skips the fingerprinting part. I have a custom view that depends on that guy and some more. Because they dont have fingerprint I had to use asset_path with the :digest => false option. Why did you choose to copy over the files manually instead of relying on Rails/sprockets?

BTW, thanks for the gem, really helpful.

spohlenz commented 11 years ago

I've outlined one of the reasons here: https://github.com/spohlenz/tinymce-rails/issues/87#issuecomment-12830162 but your post reveals the other driving reason behind why its done the way it is.

TinyMCE is a little unorthodox in that it has its own dependency loader for themes, plugins and other related JS files, which explicitly requires that the asset filenames are not fingerprinted. In addition to the dependency loader, a lot of built-in plugins have static .html files which include the undigested version of the asset.

Whilst Sprockets currently copies over undigested assets which would make things work both ways (at the cost of precompile performance), I believe this feature is going away soon.

pcasaretto commented 11 years ago

Thanks for clearing that up!