Reputation: 516
I have slim html .slide-1.bg-image.bg-pattern
and want to do dynamic number of slide slide-2,slide-3, through ruby each
im try to do like this
[email protected]_with_index do |l,index |
.slide-"#{index}".bg-image.bg-pattern
but have got an syntax error
How to make it properly?
Upvotes: 0
Views: 163
Reputation: 984
[email protected]_with_index do |l,index |
.bg-image.bg-pattern class="slide-#{index}"
Upvotes: 1