1
0
Fork 0
mirror of https://github.com/haml/haml-rails.git synced 2022-11-09 12:34:15 -05:00
let your Gemfile do the talking
Find a file
Jason Kim 6bfa796cdd Added Rails generator command: rails g haml:application_layout convert
PR for #47
https://github.com/indirect/haml-rails/issues/47

Usage
Once you install haml-rails gem, you can run the following command
to convert application.html.erb to application.html.haml.

`$ rails generate haml:application_layout convert`
or
`$ rails g haml:application_layout convert`
2014-12-02 18:48:21 -08:00
gemfiles Update Travis and Appraisals to reflect Rails 4.x requirement. Remove obsolete test gemfiles. Add Rails 4.1 gemfile. Update test_helper to use minitest 2013-12-27 14:05:15 -08:00
lib Added Rails generator command: rails g haml:application_layout convert 2014-12-02 18:48:21 -08:00
test Update Travis and Appraisals to reflect Rails 4.x requirement. Remove obsolete test gemfiles. Add Rails 4.1 gemfile. Update test_helper to use minitest 2013-12-27 14:05:15 -08:00
.gitignore ignore vendor/bundle 2013-11-27 20:45:59 -08:00
.travis.yml Update Travis and Appraisals to reflect Rails 4.x requirement. Remove obsolete test gemfiles. Add Rails 4.1 gemfile. Update test_helper to use minitest 2013-12-27 14:05:15 -08:00
Appraisals Update Travis and Appraisals to reflect Rails 4.x requirement. Remove obsolete test gemfiles. Add Rails 4.1 gemfile. Update test_helper to use minitest 2013-12-27 14:05:15 -08:00
Gemfile Added Rails generator command: rails g haml:application_layout convert 2014-12-02 18:48:21 -08:00
haml-rails.gemspec Added Rails generator command: rails g haml:application_layout convert 2014-12-02 18:48:21 -08:00
LICENSE MIT licensed 2012-12-08 11:20:32 -08:00
Rakefile allow rake without appraisal 2013-11-27 22:33:22 -08:00
README.md Update documentation to clarify rails version compatibility 2014-06-07 15:34:52 -04:00

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.

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, 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

License

Ruby license or MIT license, take your pick.