Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation issues #59

Open
rainierwolfcastle opened this issue May 1, 2012 · 0 comments
Open

Documentation issues #59

rainierwolfcastle opened this issue May 1, 2012 · 0 comments

Comments

@rainierwolfcastle
Copy link

I'm playing around with Matador and there are a few places where the documentation on the github project page doesn't match the current implementation (or, I'm doing it wrong).

e.g. Adding a before filter:

module.exports = function (app, config) {   
  return app.controllers.Base.extend(function() {
    this.addBeforeFilter(this.requireAuth);
  }).methods({
    requireAuth: function(callback) {
      return callback(null);
    }
  });
}

Gives me the following error:

TypeError: object is not a function
    at IncomingMessage.CALL_NON_FUNCTION (native)
    at /Users/taylorr/Code/myapp/app/controllers/ApplicationController.js:7:14
    at callbacks (/Users/taylorr/Code/myapp/node_modules/matador/node_modules/express/lib/router/index.js:272:11)
    at param (/Users/taylorr/Code/myapp/node_modules/matador/node_modules/express/lib/router/index.js:246:11)
    at pass (/Users/taylorr/Code/myapp/node_modules/matador/node_modules/express/lib/router/index.js:253:5)
    at Router._dispatch (/Users/taylorr/Code/myapp/node_modules/matador/node_modules/express/lib/router/index.js:280:4)
    at Object.handle (/Users/taylorr/Code/myapp/node_modules/matador/node_modules/express/lib/router/index.js:45:10)
    at next (/Users/taylorr/Code/myapp/node_modules/matador/node_modules/express/node_modules/connect/lib/http.js:204:15)
    at next (/Users/taylorr/Code/myapp/node_modules/matador/node_modules/express/node_modules/connect/lib/http.js:206:9)
    at Object.methodOverride [as handle] (/Users/taylorr/Code/myapp/node_modules/matador/node_modules/express/node_modules/connect/lib/middleware/methodOverride.js:35:5)

Can you help me out here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant