title: Ruby On Rails: Concatenate String in loop
body: <p>I am new to RoR. I was trying to find a way over googling to concatenate the string in a loop in Controller.</p>
  
  <pre><code>assets = Asset.where({ :current_status =&gt; ["active"] }).all
  assets.each do |a|
        string = string + ":"+ a.movie_title 
  end
  </code></pre>
  
  <p>I want to concatenate attribute "movie_title" as a string that would be colon separated.</p>
  
  <p>but i get error</p>
  
  <pre><code>undefined method `+' for nil:NilClass
  </code></pre>