codebrew / backbone-rails

Easily use backbone.js with rails 3.1
MIT License
1.62k stars 255 forks source link

fix install generator to play nice with CoffeeScript application manifests #145

Closed nzaillian closed 10 years ago

nzaillian commented 11 years ago

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 was injecting the require directives for backbone (and the dependencies) several times over (before each "require_tree"). It's a safe assumption 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 you can ignore/revert that.

zeevallin commented 11 years ago

+1

elektronaut commented 11 years ago

+1

westonplatter commented 10 years ago

@nzaillian - wicked awesome. You mind if I pull this into https://github.com/westonplatter/railsy_backbone?

nzaillian commented 10 years ago

sure!

westonplatter commented 10 years ago

@nzaillian thanks. :smile: . If you don't mind, I added you credited with with the change. https://github.com/westonplatter/railsy_backbone/pull/6/files

manusajith commented 10 years ago

@nzaillian I have added this after fixing conflicts. Thanks.!