문제

I have some .yml files that may be dynamic. So I wanted to add this kind of code on my html:

<h3><%=data.fitness_programs["#{f.filename}"].en.title%></h3>

Looks line the rails "#{var_in_here}" is not possible here.

How can I do this?

도움이 되었습니까?

해결책

My bad, as this was a loop of filenames I did not realize I had an error in one of these. The code above does work :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top