title: How to add to a serialized array
body: <p>I have an existing user which has a serialized field and I want to be able to add recent messages to the array / serialized field.</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
   serialize :recent_messages
  end
  </code></pre>
  
  <p>In the controller I've tried</p>
  
  <pre><code>@user = current_user
  @user.recent_messages &lt;&lt; params[:message]
  @user.save
  </code></pre>
  
  <p>but I get the following error:</p>
  
  <pre><code>NoMethodError (undefined method `&lt;&lt;' for nil:NilClass):
  </code></pre>
  
  <p>In my schema I have:</p>
  
  <pre><code>create_table "users", :force =&gt; true do |t|
      t.text     "recent_messages"
    end
  </code></pre>
  
  <p>Any ideas on where I'm going wrong?</p>