meleyal / backbone-on-rails

A simple gem for using Backbone.js with Rails.
MIT License
810 stars 126 forks source link

Insert Backbone dependencies before require_tree #27

Closed mulderp closed 11 years ago

mulderp commented 12 years ago

I added some files for testing the generator, and I use

inject_into_file to patch the application.js file

I found this method here:

https://github.com/rails/rails/blob/d246da1603a9833532a5eebb3836be25a87dfaa6/railties/lib/rails/generators/actions.rb#L279

The devise gem patches the config(routes.rb in a similar manner.

Eventually, you want to reduce the files in the test rails_app or do some reformatting. Hope you like this.