This is not a general purpose generator. I made it to fit my needs, specially with Views which heavily rely on backbone.grid. My plan is to make a more generic version later, or gladly accept a pull request that adds one ;-). Regarding templates I'm using handlebars, but it's fairly easy to add another one and use hooks to make the hole thing extremely modular.
Install with Rails 3.1
In your Gemfile :
In your console :
rails g backbonify:install rails g backbonify:scaffold Model field:type field:type
backbonify:scaffold hooks on those (sub) generators. You can also cherry pick them!
rails g backbonify:model Model field:type ... rails g backbonify:router Model rails g backbonify:view Model rails g backbonify:template Model field:type ...
What it Looks like (with styling)
Dependencies for haml and handlebars
Include them in your Gemfile
gem 'handlebars_assets' gem 'haml_assets', :git => "http://github.com/infbio/haml_assets" gem 'haml', :git => 'http://github.com/infbio/haml', :branch => 'form_for_fix'
specs ! & examples.
This project rocks and uses MIT-LICENSE.