Medium / matador

an MVC framework for Node
http://medium.github.io/matador
Other
604 stars 49 forks source link

How I get access to model? #111

Closed messyOne closed 11 years ago

messyOne commented 11 years ago

Hi,

I build a model like the example "How can I organize my Models?" in the Readme.md, but how can I access the model in controller? If I call this.getModel(...) I get the error message "TypeError: Object # has no method 'getModel'".

messyOne commented 11 years ago

Just a few minutes after my question I found the solution. I had used this.getModel('User') but instead I have to use app.getModel('User'). Maybe add the model access handling to your example?