In a rails view, collection of items
<% @useful_types.each do |useful_type| %>
processes a number of operations
<% @init = @valid_mos.first %>
These operations need to be held over as unique values in the same view to be used in furteh context. However I cannot fine the syntax to allow a processed string to generate an instance variable
<% @#{useful_type[2..-1]}_code = @init.code %>
is not allowed @#. Is there a succinct way to achieve this ?