html - Putting a variable into a DIV using HAML -


I am trying to assume an array and assign it to a Div class.

  - Usage. You do it. Value | % P = value [0]% p = value [1]   

The result in what you would expect, assuming that the value is [0] and the value [1] contains data Are working.

I covered it with trying different things around it and it is as close as I can get:

  -values.each do | Value | - div = values ​​[1] -div = value [0]   

then throws this error:

the undefined method `div = ' "Day": string

and the string is in the "day" values ​​[1]

Any ideas?

  - values.each do | Value | % Div {: class = & gt; Value [1]} = value [0]    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -