Sha256: 18f69203cfe102c4b9aafb1f1d7e48da95ac7c68a3e4b5126b73323fc4c13fc7
Contents?: true
Size: 1.8 KB
Versions: 2
Compression:
Stored size: 1.8 KB
Contents
# Haml-rails Haml-rails provides Haml generators for Rails 4. It also enables Haml as the templating engine for you, so you don't have to screw around in your own application.rb when your Gemfile already clearly indicated what templating engine you have installed. Hurrah. To use it, add this line to your Gemfile: gem "haml-rails" This ensures that: * Any time you generate a controller or scaffold, you'll get Haml templates (instead of ERB) * When your Rails application loads, Haml will be loaded and initialized automatically * Haml templates will be respected by the view template cache digestor Pretty fancy, eh? The modern world is just so amazing. ### Converting Rails application layout file to haml format Once Haml-rails is installed on the Rails application, you can convert the erb layout file, `app/views/layouts/application.html.erb` to `app/views/layouts/application.html.haml` using this command: $ rails generate haml:application_layout convert After the application layout file is converted successfully, make sure to delete `app/views/layouts/application.html.erb`, so Rails can start using `app/views/layouts/application.html.haml` instead. ### Older versions of Rails The current version of Haml-rails requires 4.0.1 or later. Haml-rails version 0.4 is the last version to support Rails 3. To use it, add this line to your Gemfile: gem "haml-rails", "~> 0.4.0" ### Contributors Haml generators originally from [rails3-generators](http://github.com/indirect/rails3-generators), and written by José Valim, André Arko, Paul Barry, Anuj Dutta, Louis T, and Chris Rhoden. Tests originally written by Louis T. ### Code Status [![Build Status](https://travis-ci.org/indirect/haml-rails.png)](https://travis-ci.org/indirect/haml-rails) ### License Ruby license or MIT license, take your pick.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
haml-rails-0.7.0 | README.md |
haml-rails-0.6.0 | README.md |