Ruby-haml: Difference between revisions

From Bashlinux
Jump to navigationJump to search
Content deleted Content added
No edit summary
Manpaz (talk | contribs)
Redirected page to Ruby Haml
 
Line 1: Line 1:
#REDIRECT [[Ruby_Haml]]
__NOTOC__
= Ruby: HAML =
== How to install Ruby Gem HAML ==
Install as root the ruby gem
<pre><nowiki>
gem install haml
</nowiki></pre>


== How to handle arrays on HAML ==
When printing an array with the `collect` method, if is evaluating in the header where "-" can be matched or a property in the form "name:" the result will print a `0000` at the end, because obviously the string in question es evaluated and added to the end. In order to avoid this string, add the method `reject` to the end, so if it found one of the above matched characters/strings, it won't be displayed and then `0000` won't be displayed.
<pre><nowiki>
%p #{prop}
</nowiki></pre>


== Links ==
* [[http://nex-3.com/posts/74-haml-errors-suck| HAML Errors]]

Latest revision as of 00:16, 7 June 2015

Redirect to: