adding in a note about how to change the default behaviour of indentation in Rails. we had the question and answer, but no answer on how to change it. ;)

This commit is contained in:
Hampton Catlin 2014-07-27 11:04:23 +02:00
parent cea0fe57d0
commit 142d6b0b92
1 changed files with 9 additions and 1 deletions

10
FAQ.md
View File

@ -5,7 +5,15 @@
### Why is my markup indented properly in development mode, but not in production? {#q-indentation-in-production}
To improve performance, Haml defaults to {Haml::Options#ugly "ugly" mode} in
Rails apps running in production.
Rails apps running in production. Ugly mode is when whitespace is stripped out,
and this *can* cause issues occassionally.
If you are using Rails, you can change the default behaviour by creating a config/initializers/haml.rb file and
adding in the following line.
Haml::Template.options[:ugly] = true
Or, you can pass in false, if you want your production mode to run all pretty like.
### How do I put a punctuation mark after an element, like "`I like <strong>cake</strong>!`"? {#q-punctuation}