Skip to content
This repository

Simple script to bulk covert ERB files in a Rails app to Haml

branch: master

Merge pull request #8 from lisasy/patch-1

Remove extra linespace
latest commit 5a0d8667d8
David Leung authored
Octocat-spinner-32 lib Remove extra linespace March 17, 2014
Octocat-spinner-32 .gitignore Repackaged code into a gem. February 12, 2011
Octocat-spinner-32 CHANGELOG.md Fixed issue #4 April 20, 2013
Octocat-spinner-32 Gemfile Fixed issue #4 April 20, 2013
Octocat-spinner-32 LICENSE Repackaged code into a gem. February 12, 2011
Octocat-spinner-32 README.md Add syntax highlighting January 08, 2014
Octocat-spinner-32 Rakefile Fixed require issues. February 13, 2011
Octocat-spinner-32 erb2haml.gemspec Fixed issue #4 April 20, 2013
README.md

erb2haml

erb2haml gives your Rails app rake tasks to convert or replace all ERB view templates to Haml.

Getting Started

Enabling the rake tasks

Add gem "erb2haml" to the development group in your Gemfile. You can do this by adding to your Gemfile the line

gem "erb2haml", :group => :development

or if you prefer the block syntax

group :development do 
  # ... 
  gem "erb2haml"            # Add this line 
  # ... 
end

Converting ERB Templates to Haml

After enabling the rake tasks, you can convert your ERB templates to Haml in two ways, depending on whether you would like to keep the original ERB templates or not.

Keep the original ERBs? Rake task to run
Yes rake haml:convert_erbs
No rake haml:replace_erbs

License

Copyright (c) 2011-2013 David Leung and contributors. See LICENSE for further details.

Something went wrong with that request. Please try again.