Sorry, I should've explained more. This is the general idea.

There is a Sign Up form which creates 3 records in 3 different models:
Account
Company (belongs to account)
User (belongs to user)

So the Sign Up form, creates the user from the accounts_controller.rb
@account = Account.new
company = @account.companies.build
company.users.build

Now, once the sign up is complete, the user can invite other people to 
user the web app. So he adds users, the app sends an invitation email 
and when the person clicks on the invitation email, it gives it a form 
to choose desired username.

In summary...
1) when the user is being created from the accounts controller (sign 
up), REQUIRE username
2) when the user is adding other users from users controller (add user),
DO NOT REQUIRE username

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to