title: Ruby Sinatra textarea displays variable string instead of variable value
body: <p>I'm trying to set up a webapp using Sinatra, and I've got it working currently where the user can enter a list of URLs into a textarea, click submit, and then some code is ran on the URLs and the user is redirected to a second page to view the result. I'd like to remove the redirection and display the results in another textarea on the same page(or even re-use the same text area) but I've so far been unsuccessful in this venture. Instead of displaying the result, the second textarea just displays the &lt;%=res%> and the submitted URLs disappear.</p>
  
  <p>ERB page</p>
  
  <pre><code>&lt;h1&gt;Put URLs Here&lt;/h1&gt;
  &lt;form method="POST" action=""&gt;
  &lt;p&gt;&lt;textarea id="urls" name="urls" rows="20" cols="60"&gt;
  &lt;/textarea&gt;&lt;/p&gt;
    &lt;input type="submit"&gt;
  &lt;/form&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;h1&gt;Results&lt;/h1&gt;
  &lt;p&gt;&lt;textarea id="results" name="results" rows="20" cols="60"&gt;
    &lt;%=res%&gt;
  &lt;/textarea&gt;&lt;/p&gt;
  </code></pre>
  
  <p>app.rb</p>
  
  <pre><code>require 'sinatra'
  
  get '/ip' do
    erb :ip
  end
  
  post '/ip' do
    res = Hash.new("")
    u = params[:urls].lines("\n")
    list = Ipcheck.new()
    res = list.check(u)
    erb :ip, :locals =&gt; {'res' =&gt; res}
  end
  </code></pre>
  
  <p>What am I doing wrong? I've searched and have not been able to find a solution to this specific problem.</p>