How to read model in a view?

7 views
Skip to first unread message

品雪

unread,
Jul 24, 2014, 5:53:12 AM7/24/14
to compo...@googlegroups.com
Let's say there is a Company <===> User relationship, where Company hasMany Users and Users belongsTo Company.

I plan to use a select in the user form, the options are instance of Companies. Simply call Company.all() in _form.ejs throws error like:

500 ReferenceError:  .../test/app/views/users/new.ejs:29


Company is not defined

Reply all
Reply to author
Forward
0 new messages