codebrew/backbone-rails — pull request #145 by nzaillian (2013-01-21 09:43:51+00:00)
Title: fix install generator to play nice with CoffeeScript application manifests

The install generator choked for me with a stack trace because I have an application.js.coffee manifest instead of application.js. Also, I modified the generator to inject the require directives after "require jquery_ujs" (instead of "require_tree") because often times (as in my own present case) I'm require_tree'ing several directories and so the generator injected the backbone (and dependencies) several times over. It's a safe assumption, I think, that just about every rails app will have a "require jquery_ujs" line in the application js/coffee manifest, I think, but if you disagree ignore that.