spohlenz / tinymce-rails

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

Multiple File Includes #41

Closed TRMW closed 12 years ago

TRMW commented 12 years ago

I just switched to tinymce-rails from the tiny_mce gem after upgrading my app to Rails 3.1. I'm noticing that the gem seems to include 4 separate javascript files in the <head> of the page:

<script src="/assets/tinymce/preinit.js?body=1" type="text/javascript"></script>
<script src="/assets/tinymce/tiny_mce_jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/tinymce/jquery-tinymce.js?body=1" type="text/javascript"></script>
<script src="/assets/tinymce-jquery.js?body=1" type="text/javascript"></script>

Is there any way these could be consolidated into one file? It would be nice to cut down on the number on HTTP requests.

Also, the tinymce-jquery.js file seems to be blank.

Thanks for your work on this!

spohlenz commented 12 years ago

You'll only see these files separated in development mode (or more precisely, when config.assets.debug = true). In production mode it'll be served as one file.

TRMW commented 12 years ago

Got it, thanks. Still getting used to this asset pipeline stuff, obviously.