title: Rails duplicate loop - Hash and array loop
body: <p>In my view I have:</p>
  
  <pre><code>&lt;% @results.each_pair do |country_code, available| %&gt;
     &lt;% @prices.each do |cc,domain| %&gt;
     &lt;% klass = available.registered? ? "pinfo" : "info" %&gt;
      &lt;span class="&lt;%= klass %&gt;"&gt;&lt;/span&gt;
      &lt;%= @domain + country_code %&gt;       &lt;%= domain.send(cc) %&gt;$&lt;br /&gt;
   &lt;% end %&gt;
   &lt;% end %&gt;
  </code></pre>
  
  <p>And the output is:</p>
  
  <pre><code>asdsaddk 8$
  asdsaddk 1$
  asdsadcom 8$
  asdsadcom 1$
  </code></pre>
  
  <p>My controller:</p>
  
  <pre><code>def domain
    country_codes = %w[ dk com ]
  
    @domain = "asdsad"
  
    @results = { }
    @prices = { }
  
    country_codes.each do |cc|
      @results[cc] = Whois.whois("#{@domain}.#{cc}")
      @prices[cc.to_sym] = Domain.order(cc).first
    end
    render :layout =&gt; false
  end
  </code></pre>
  
  <p>How do I create a normal loop like where the output is not duplicate like:</p>
  
  <pre><code>asdsaddk 8$
  asdsadcom 1$
  </code></pre>