Howdy.
I'd like the cycle method to take an array of values which I compile on the fly, but it seems to be interpreting it not as I'd have hoped.
(In this example it's a static array, but I want it to work so that I can use arrays that are constructed variably)
- some_array = ['one', 'two', 'three']
- colors.each do |color|
%a{ :name => color, :class => "#{cycle(some_array)}" }
That applies this as a class to each element:
"three"] "two", ["one",
...looks as though it's calling to_s
on the array or something.
How am I supposed to be doing this?