Access resource and action name from request handler #65

reaktivo opened this Issue Aug 15, 2012 · 0 comments


None yet

1 participant


Is there a way to to access the resource name and/or action from inside the request handler? e.g.

// app.js
app.resource('user', require('./users.js'));
// users.js
exports.index = function(req, res) {
  var resource = req.resource;
  var action = req.action;
  res.render(resource + "/" + action);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment