title: Mongoose findByIdAndUpdate is not updating data
body: <p>Can't seem to see why findByIdAndUpdate is not updating the data. I changed it to findByIdAndRemove to see if I could spot the error but when I change it, it did delete so I couldn't track down the issue. Appreciate your help in advance. </p>
  
  <p>Here is the route</p>
  
  <pre><code>    router.get("/:id/edit", function(req, res){
      Product.findById(req.params.id, function(err, foundProduct){
          res.render("admin/edit",{product: foundProduct});
      });
  });
  
  
  router.put("/:id",function(req, res){
     Product.findByIdAndUpdate(req.params.id, req.body.product, function(err, updatedProduct){
         if(err){
             res.redirect("/");
         }else{
             res.redirect("/admin/inventory");
         }
     });
  });
  </code></pre>
  
  <p>Here is the button to get to edit form:</p>
  
  <pre><code>&lt;h2&gt;This is the inventory page!&lt;/h2&gt;
  
  &lt;% include ../partials/header%&gt;
  
  &lt;a href="/admin/new"&gt;Add a new product&lt;/a&gt;
  
      &lt;div class = "row"&gt;
      &lt;% products.forEach(function(product){ %&gt;
              &lt;div class = "col-sm-6 col-md-4"&gt;
                  &lt;div class = "thumbnail"&gt;
                      &lt;img src = &lt;%=product.imagePath%&gt; alt = "..." class = "img-responsive"&gt;
                          &lt;div class = "caption"&gt;
                              &lt;h3&gt;&lt;%=product.title%&gt; &lt;/h3&gt;
                                  &lt;p class = "description"&gt; &lt;%=product.description%&gt; &lt;/p&gt;
                                  &lt;div class = "clearfix"&gt;
                                  &lt;div class = "price pull-left"&gt;$&lt;%=product.price%&gt;  &lt;/div&gt;&lt;br&gt;&lt;br&gt;
                                  &lt;a href = "/admin/&lt;%=product._id%&gt;/edit"class = "btn btn-info pull-right" role = "button" &gt; Edit&lt;/a&gt;
                  &lt;form id="delete-form" action="/admin/&lt;%= product._id %&gt;?_method=DELETE" method="POST"&gt;
                             &lt;button class="btn btn-danger"&gt;Delete&lt;/button&gt;
                         &lt;/form&gt;
                                  &lt;/div&gt;
                          &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
    &lt;% }); %&gt;
      &lt;/div&gt;
  
  
  
  &lt;% include ../partials/footer%&gt;
  </code></pre>
  
  <p>Here is the edit form:</p>
  
  <pre><code>&lt;% include ../partials/header %&gt;
  
  &lt;h2&gt;This is the inventory edit page&lt;/h2&gt;
  
  
  &lt;div class="container"&gt;
      &lt;div class="row"&gt;
      &lt;h1 style="text-align: center"&gt;Edit&lt;/h1&gt;
      &lt;div style="width: 30%; margin:25px auto"&gt;
          &lt;form action="/admin/&lt;%=product._id%&gt;?_method=PUT" method="POST"&gt;
              &lt;div class="form-group"&gt;
                  &lt;input class="form-control" type="text" name="product[title]" value="&lt;%=product.title%&gt;"&gt;
              &lt;/div&gt;
               &lt;div class="form-group"&gt;
                  &lt;input class="form-control" type="text" name="product[imagePath]" value="&lt;%=product.imagePath%&gt;"&gt;
              &lt;/div&gt;
               &lt;div class="form-group"&gt;
                  &lt;input class="form-control" type="text" name="product[description]" value="&lt;%=product.description%&gt;"&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                 &lt;input class="form-control" type="text" name="product[price]" value="&lt;%=product.price%&gt;"&gt;
             &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;button class="btn btn-lg btn-primary btn-block"&gt;Submit!&lt;/button&gt;
              &lt;/div&gt;
          &lt;/form&gt;
           &lt;a href="/"&gt;Go Back&lt;/a&gt;
      &lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;% include ../partials/footer %&gt;
  </code></pre>
  
  <p>Here is the product model:</p>
  
  <pre><code>var mongoose = require('mongoose');
  
  module.exports = mongoose.model('Product',{
    imagePath: {type: String, required: true},
      title: {type: String, required: true},
      description: {type: String, required: true},
      price: {type: Number, required: true}
  });
  </code></pre>