I have a Rails 3.2 application with a standard asset pipeline - that is, controller has its own Javascripts defined in separate CoffeeScript files.
I noticed today that in development mode (when all JS files are loaded individually on every page) they stop working after a certain point. I'm assuming this is because there's a mystery error somewhere in one of the files above it. The console shows two errors related to elements not being found on that page (to be expected, since they are from a different controller).
But, I looked at the production application and the same thing is happening. I am on the pages controller for the homepage, looked at the miniaturized JS file and found references to a completely separate controller. The same errors were also present saying that elements weren't found on that page. And again, the JS after that point all failed and aren't working.
I assumed that Rails only compiled that controllers JS? If this isn't the case, how do I go about making it that way so that certain JS only appears on certain pages?
Thanks in advance for any help!