search for: useridvar

Displaying 1 result from an estimated 1 matches for "useridvar".

Did you mean: useridnr
2006 Apr 28
3
store user id in session or find user id
...entry. (the logged in user) Is it possible to store return the id and store it in session once the user is created. then do somthing like @project.user_id = session[:user].id; or can I perform a search in the product table grabbing the id of the using the username that is stored in session? ie userIdVar = User.find(session[:user].login) then do @project.user_id = userIdVar how can this be done? Sure both ways are possible, but any suggestions and reasons to why a certian way is better over the other? -- Posted via http://www.ruby-forum.com/.