1

I remember seeing a rails method that was something like:

<%= toggle(["hello", "i", "am"]) %>

and if put in a .each like this:

<% @something.each do |s| %>
    <%= toggle(["hello", "i", "am"]) %>
<% end %>

it should produce the following:

hello i am

I've been searching through documentation online and can't find this method but I know I've seen it somewhere. Does anyone know what the actual method is?

Paul A Jungwirth
  • 23,504
  • 14
  • 74
  • 93
Philip7899
  • 4,599
  • 4
  • 55
  • 114

0 Answers0