title: View printing contents of Variable Ruby on rails for no apparent reason
body: <p>There seems to be something weird going on with my rails app. I have an action in my controller called Info that sends a request to a webservice, and then renders the data in a neatly formatted way corresponding view.</p>
  
  <p>The problem is that for some reason it decides it will be fun to print the content of @destinations at the end of the loop. See the example code below. Obviously I've simplified the code a bit for readability,  but the problem still occurs with the below code. If there is any other code that is relevant, let me know and I will update the question.</p>
  
  <p>CONTROLLER</p>
  
  <pre><code>def info
    /*Execute some WebService call here and convert into Hash*/
    @destinations = ros.data.places.map{|dest| dest.name}
  
    respond_to do |format|
      format.html { render :layout =&gt; false }
    end
  end
  </code></pre>
  
  <p>VIEW</p>
  
  <pre><code>&lt;%=@destinations.each do |dest| %&gt;
    &lt;%=dest%&gt;
  &lt;%end%&gt;
  </code></pre>
  
  <p>OUTPUT</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;&lt;/head&gt;
    &lt;body&gt;
        Laos Latvia ["Laos", "Latvia"]
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>