title: Pass User.id from ejs file to a controller function
body: <p>I wasn't quite sure how to word this title. Basically I have an ejs page that displays all users in a table and each user has an edit button that I can get to link to that individual user by user/user.id. But it displays it as json. I want to display it in another ejs file but I can't figure out how to pass the user.id on button click to my controller function to display the individual user page. I'm not sure what I'm missing here I've tried several things and user keeps returning undefined. Here is what I have, any help is greatly appreciated. I've removed extra code from below.</p>
  
  <p>Users.ejs</p>
  
  <pre><code>&lt;td&gt;&lt;a href="/systemuser"&gt;&lt;button type="button"&gt;Edit&lt;/button&gt;&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  
  <p>Routes.js</p>
  
  <pre><code>'get /systemuser': 'UserController.systemuser'
  </code></pre>
  
  <p>UserController.js</p>
  
  <pre><code>systemuser: function(req, res) {
        User.findById( req.param('id'))
        .exec(function(err, user) {
            res.view({user: user});
      });
    },
  </code></pre>
  
  <p>Thanks!</p>