title: Cannot POST with Node.js Express MongoDB Mongoose CoffeeScript
body: <p><strong>Update:</strong> I found the solution, look in the bottom of this page...</p>
  
  <p>I've got a Node.js, Express, MongoDB, Mongoose project written in CoffeScript and I can create and read data, but I can't update.</p>
  
  <p>This is what my code looks like;</p>
  
  <p>app.js</p>
  
  <pre><code> # update
   app.put "/admin/:id.:format?", (req, res) -&gt;
      Content.findById req.body.content.id, (err, c) -&gt;
          c.title = req.body.content.title
          c.body = req.body.content.body
          c.save (err) -&gt;
              switch req.params.format
                  when "json"
                      res.send c.__doc
                  else
                      res.redirect "/admin"
  </code></pre>
  
  <p>edit.jade</p>
  
  <pre><code>h2 Edit Content
  form(method='post', action='/admin/' + c.id)
    input(name='content[id]', value=c.id, type='hidden')
    input(name='_method', value='PUT', type='hidden')
  div
    label Title:
      input(name='content[title]', value=c.title || '')
  div
    label Body:
      textarea(name='content[body]')=c.body || ''
  div
    input(type='submit', value='Save')
  </code></pre>
  
  <p>And this is what my console says</p>
  
  <pre><code>127.0.0.1 - - [Thu, 13 Oct 2011 21:39:55 GMT] "POST /admin/4e96ec17fd7da7cb18000001 HTTP/1.1" 404 - "http://localhost:1234/admin/4e96ec17fd7da7cb18000001/edit" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.83 Safari/535.2"
  </code></pre>
  
  <p>And this is what my browser tells me</p>
  
  <pre><code>Cannot POST /admin/4e96ec17fd7da7cb18000001
  </code></pre>