I have these tables...
account_id (foreign key)
I have a create new user form. Each user is supposed to have an
account_id from an accounts table. Of course, on my user.rb model file I
have to validate for the presence of an account_id. How can I add the
account_id to the users table?
1) Maybe after logging in I store the account id on a session. Then,
when the user tries to add another user I grab it from the session?
2) Orrr... so I won't use a session, when the user tries to add another
user, I can query the user's row, get his account_id and then use it.
Which approach would work better?
Now, once I have the account id, how can I go about adding it at user
creation? At the users controller?