title: Create does not rollback when validation fails
body: <p>Code in the Controller for method (<code>reservations_controller.rb</code>):</p>
  
  <pre><code> def create_reserve
          @reservation = Reservation.create(reservation_params)
  
          respond_to do |format|
            user = User.find_by_email(@reservation.email)
            if !user
              format.html {redirect_to reserve_path(:lpn =&gt; @reservation.lpn), notice: 'Customer does not exist'}
            end
  
            if @reservation.save
              checkout_timer @reservation.expect_start_time, @reservation.id, @reservation.lpn
              @car = Car.find_by_lpn(@reservation.lpn)
              if @car.status == "Available"
                @car.status = "Reserved"
                @car.update_attribute(:status, "Reserved")
              end
              @reservation.update_attribute(:status, "Reserved")
              format.html {redirect_to @car, notice: 'Reservation was successfully made.'}
              #   format.json { render :show_reserve, status: :reserved, location: @reservation }
            else
              format.html {redirect_to reserve_path(:reserve =&gt; {:email =&gt; @reservation.email, :lpn =&gt; @reservation.lpn}), notice: @reservation.errors.full_messages[0]}
            end
          end
        end
  </code></pre>
  
  <p>Code in Model (<code>reservation.rb</code>):</p>
  
  <pre><code>validate :timeValidation, on: :create
  validate :timeValidation, on: :update
  
  def timeValidation
    if expect_start_time &lt; Time.now || expect_start_time &gt; Time.now + 7.days
      errors.add(:expect_start_time, "should be within 7 days from now")
    elsif  expect_return_time &lt; Time.now || expect_return_time &lt;= expect_start_time
      errors.add(:expect_return_time, "should be later than expect start time!")
    elsif expect_return_time - expect_start_time &gt; 10.hours
      errors.add(:expect_return_time, :expect_start_time, "Total rental time should be no more than 10 hours.")
    end
  end
  </code></pre>
  
  <p>In the function, when @reservation.save gets executed, the validation function in Reservation model will get called. I expect that when validation fails, Reservation.create(reservation_params) gets rolled back. However, what really happened is like this:</p>
  
  <p><a href="https://i.stack.imgur.com/LupHK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LupHK.png" alt="enter image description here"></a></p>
  
  <p>Before @reservation.save, the create already get committed. But I have <code>validate :timeValidation, on: :create</code>. It is supposed to roll back. Why?</p>