So I have the following haml code:
.row
.col-sm-12
%h2
= @title
%h3 This Week
%table
%tr
%td
%strong Date
%td
%strong
= @available__or_tutor
- 7.times do |i|
%tr
%td{:rowspan => 3}
= @date = @date + 1.days
- @available_times.each do |available_time, index|
- if i == available_time.day
- if index == 0
%td
= @tutor_var
%img{:src => "/assets/tick.png", :style => "width: 30%;"}
- else
%tr
%td
%tr
%td
and I would like the final
%tr
%td
%tr
%rd
To be nested within the else statement. Specifically, they should line up with the tr just below 7.times do |i| because of the way haml forces indentation I can't seem to do this. I was wondering if HAML had some kind of override to permit some kind of backwards indentation. If that makes sense.
The less desirable solution is of course to add a partial in html/erb and just dump haml for that bit.