radiegtya / meteoris2

a Realtime Javascript Boilerplate base on Meteor Js Framework
MIT License
246 stars 46 forks source link

Assigning projects to users #72

Closed andrewcoelho closed 9 years ago

andrewcoelho commented 9 years ago

Hello, I am trying to use crudss generator to assign projects to user. For example, structure:

Project description: Project due date: User:

So when I go to insert new project, I can insert project description, a date, and assign it to some user that is already in the system. However, I am having difficulty choosing which parameters to enter into crudss generator. I have been trying with these parameters:

Name: userId Belongs to collection: Users Relation: user

But when I go to insert new project there are no users in the dropdown.

I have no problem if I make a new collection of users to assign them to projects, but this defeats the purpose.

radiegtya commented 9 years ago

Name: userId Belongs to collection: Meteor.users Relation: user

that should do the trick as long Users is not part of meteor default collection :)

adrianricardo commented 9 years ago

@heron88 did @radiegtya solution work for you? I tried it but it didn't seem to like the "." in Meteor.users. I received the following error "client/views/promoters/_form.js:15:11: Unexpected token ."

radiegtya commented 9 years ago

you can clearly see that the error was from _form js and not from the relation thing. can you give the _form.js code? so I can review it

andrewcoelho commented 9 years ago

@adrianricardo yes it did.