title: before_validation on create not working
body: <p>In my model I have</p>
  
  <pre><code>class Test &lt; ActiveRecord::Base
    before_validation :set_pending, on: :create
    validates :status, presence: true, inclusion: { in: %w(passed failed pending) }
    .
    .
    .
    private
  
    def set_pending
      status = 'pending'
    end
  end
  </code></pre>
  
  <p>In my rails console I am trying to create a new Test</p>
  
  <pre><code>Test.create!(user_id: 9, runnable: true) 
  </code></pre>
  
  <p>But I am getting error </p>
  
  <p><code>ActiveRecord::RecordInvalid: Validation failed: Status can't be blank</code> </p>
  
  <p>What am I doing wrong? I am on ruby 2.1.8 and rails 4.0.13. Thanks</p>