AP257
AP257

Reputation: 93983

haml documentation - where is it?

I've just started with Rails (having previously worked in Django). The hardest part is working out how to use haml.

I have found the official haml documentation. However, there seems to be no coverage here of syntax - if/else clauses, for loops, etc.

Other than Googling for examples, is there any official documentation of syntax in haml? Or am I missing something obvious?

Upvotes: 1

Views: 384

Answers (1)

Bryan Ash
Bryan Ash

Reputation: 4489

HAML doesn't have if/else clauses or loops. HAML allows you to execute any Ruby code that may include those clauses.

In the documentation you referenced, there's a section on Running Ruby which has examples of an each iterator and a case statement. An if is handled in the same way.

Upvotes: 3

Related Questions