Last Updated: February 25, 2016
·
5.869K
· ryan

Multi-line Ruby block in Haml

I always seem to forget the syntax for multi-line syntax in haml. You can also use :css, :javascript

:ruby
  first_name = "Ryan"
  last_name = "L'Italien"
%h1
  = "#{last_name}, #{first_name}"

source: http://makandracards.com/makandra/2797-multi-line-ruby-block-in-haml