title: content gets saved as nil rails
body: <p>I have run into a rather unusual situation and I can't seem to figure out why this is happening:</p>
  
  <p>I have a <code>User</code> model:</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
    has_many :posts, dependent: :destroy
  end
  </code></pre>
  
  <p>And a <code>Post</code> model:</p>
  
  <pre><code>class Post &lt; ActiveRecord::Base
    attr_accessor :content
    belongs_to :user
    default_scope{order('created_at DESC')}
  
    #validations
    validates(:content, presence: true, length: {maximum: 140})
    validates(:user_id, presence: true)
  end
  </code></pre>
  
  <p>My migration for posts looks like this:</p>
  
  <pre><code>require_relative '20150405091935_create_posts'
  class FixPosts &lt; ActiveRecord::Migration
    def change
      revert CreatePosts #this was the original migration w/o a user reference
  
      create_table :posts do |t|
        t.belongs_to :user, index: true
        t.string :content
        t.integer :user_id
  
        t.timestamps null: false
      end
    end
  end
  </code></pre>
  
  <ul>
  <li>The schema generated seems to be in order </li>
  <li>post validations are in place and work fine (my specs are passing
  and I have done some manual testing in the console)</li>
  </ul>
  
  <p><strong>The issue</strong></p>
  
  <p>I create a <code>post</code></p>
  
  <pre><code>user = User.first
  user.posts.create(content: "This is a post.")
  =&gt; true
  </code></pre>
  
  <p>However when I print it out I get the following:</p>
  
  <pre><code>#&lt;Post:0x007fc1a0f1d628
    id: 1,
    user_id: 1,
    content: nil,
    created_at: Sun, 19 Apr 2015 19:45:38 UTC +00:00,
    updated_at: Sun, 19 Apr 2015 19:45:38 UTC +00:00&gt;]
  </code></pre>
  
  <p>The content is lost and returns a <code>nil</code>.</p>
  
  <p>What is going on here? Am I missing something?</p>
  
  <p>Any help will be appreciated!Thank you for your time.</p>
  
  <p>Please let me know if any additional info is required. You can also see the entire code base on <a href="https://github.com/arumoy-shome/prilepins_strength_program" rel="nofollow"><strong>GitHub</strong></a>.</p>