Working with Rails 3.1 (rc5), and I notice that any coffeescript file in which I include rails (or asterisks) adds to the top and bottom of javascript initialization. In other words, an empty .js.coffee file is displayed, which looks like this:
(function() { }).call(this);
This is annoying because it spins the area of my javascript (if I really don't know what I'm doing). I generally separate all of my javascript classes into separate files, and I believe that having this function code to complete my classes just pulls them out of scope from each other. Or at least I cannot access them, as I constantly get undefined errors.
Is there a way to override this? This stargazer file seems to be related to the addition of this code: https://github.com/sstephenson/sprockets/blob/master/lib/sprockets/jst_processor.rb
I understand that wrapping everything in a function may seem like an additional convenience, since then nothing starts until the DOM is loaded, but as far as I can tell, it just messed up my area.
source share