title: How to remove brackets and quotation marks from array Ruby
body: <p>I have the below class method:</p>
  
  <pre><code>def self.product(basket)
    Product.find(basket.to_a).collect do |product| 
      product.name + " " + product.size + " " + product.color
    end
  end
  </code></pre>
  
  <p>The above produces the following:</p>
  
  <pre><code>["T-Shirt Medium Grey", "Sweatshirt Medium Black"]
  </code></pre>
  
  <p>I've tried the following:</p>
  
  <pre><code>def self.product(basket)
    a = Product.find(basket.to_a).collect do |product| 
      product.name + " " + product.size + " " + product.color
    end
    b = a.shift.strip
  end
  </code></pre>
  
  <p>But this ends up only giving me the first part of the array <code>T-shirt Medium Grey</code></p>
  
  <p>I'm looking for it to give me </p>
  
  <pre><code>T-shirt Medium Grey, Sweatshirt Medium Black
  </code></pre>
  
  <p>Can anyone help?</p>
  
  <p>Thanks</p>