Ruby Slim - Jak zdefiniować klasę elementu za pomocą helpera lub zmiennej rails?
W szynach slim (http://slim-lang.com/) składnia definiowania nowego div o nazwie klasy „sample” jest następująca:
.sample
= "Content goes here"
spowoduje to:
<div class="sample">
Content goes here
</div>
Chcę zdefiniować klasę div według pomocnika rail, zmiennej lub innych rzeczy, takich jak w szynach:
<div class="sample #{@variable.name}">
Content goes here
</div>
Nie mam pojęcia, jak to zrobić w szczupły sposób:
.sample #what else goes here?
Content goes here
Ktoś wie jak?