The following returns whatever integer I feed it as a parameter.
def space(spacer_count)
spacer_count.times do
image_tag("24gray/spacer.png", :class => "spacer")
end
end
How do I make it return the desired number of images? E.g., I want space(6) to return six copies of spacer.png, not the number “6”.
Thanks!
If you want to return a single string containing all the
<img>tags, then you can do the following: