Haml vs haml-rails

In order for relay generators to create representations using haml, I come across two answers and both seem to work. what's better?

Option1: declare 'haml' in the gemfile and do

config.generators do |g| g.template_engine :haml end 

Option2: just declare "haml-rails" in gemfile

+4
source share
2 answers

As described on haml-rails github. This is just Haml integration for rails. So if you like just go with the haml-rails stone

"Haml-rails provides Haml generators for Rails 3. It also allows Haml to work as templates for you, so you don’t need to get into your own .rb application when your Gemfile has clearly indicated which template engine you are comfortable with. Cheers."

+8
source

Option 2, since option 1 does not work. The "haml" declaration in your Gemfile prevents you from setting the default_engine template for: haml in your .rb application.

The haml-rails gemstone includes generators, so this is the recommended option.

+2
source

All Articles