title: haml by default
body: <p>Is there a way to configure rails to use haml by default, i.e. when a scaffold is generated the according <code>scaffold_name/index.html.haml</code> is generated instead of <code>scaffold_name/index.html.erb</code>.  </p>
  
  <p>Similar to how you are able to add <code>config.sass.preferred_syntax = :sass</code> to <code>config/application.rb</code> and have <code>scaffold_name.sass</code> generated by default.</p>
  
  <p>Tried adding the following to <code>config/application.rb</code></p>
  
  <pre><code>config.generators do |g| 
    g.template_engine :haml
  end
  </code></pre>
  
  <p>but ened up with the following</p>
  
  <pre><code>$ rails generate scaffold foo name:string
    invoke  active_record
    create    db/migrate/20120208152550_create_foos.rb
    create    app/models/foo.rb
    invoke    test_unit
    create      test/unit/foo_test.rb
    create      test/fixtures/foos.yml
     route  resources :foos
    invoke  scaffold_controller
    create    app/controllers/foos_controller.rb
     error    haml [not found]
    invoke    test_unit
    create      test/functional/foos_controller_test.rb
    invoke    helper
    create      app/helpers/foos_helper.rb
    invoke      test_unit
    create        test/unit/helpers/foos_helper_test.rb
    invoke  assets
    invoke    coffee
    create      app/assets/javascripts/foos.js.coffee
    invoke    sass
    create      app/assets/stylesheets/foos.css.sass
    invoke  sass
    identical    app/assets/stylesheets/scaffolds.css.sass
  $ rails destroy scaffold foo                                                                                                                        
    invoke  active_record
    remove    db/migrate/20120208152550_create_foos.rb
    remove    app/models/foo.rb
    invoke    test_unit
    remove      test/unit/foo_test.rb
    remove      test/fixtures/foos.yml
     route  resources :foos
    invoke  scaffold_controller
    remove    app/controllers/foos_controller.rb
     error    haml [not found]
    invoke    test_unit
    remove      test/functional/foos_controller_test.rb
    invoke    helper
    remove      app/helpers/foos_helper.rb
    invoke      test_unit
    remove        test/unit/helpers/foos_helper_test.rb
    invoke  assets
    invoke    coffee
    remove      app/assets/javascripts/foos.js.coffee
    invoke    sass
    remove      app/assets/stylesheets/foos.css.sass
    invoke  sass
  </code></pre>
  
  <p>I created a nice little bundle command to replace all erb with haml files following <a href="http://screencasts.org/episodes/using-haml-with-rails-3">this</a> screencast but I'm still interested in making it default when the scaffold is created!  How do I make it so haml files (not erb!) are generated by default?</p>