# Using Authlogic, AuthenticatesMany, and Adding Accounts

**URL:** <https://www.ruby-forum.com/t/using-authlogic-authenticatesmany-and-adding-accounts/179965>\
**Category:** Rails\
**Created:** [December 8, 2009, 9:50pm UTC](https://www.ruby-forum.com/t/using-authlogic-authenticatesmany-and-adding-accounts/179965 "2009-12-08T21:50:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scrozier](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/48db29/32.png) [@scrozier](https://www.ruby-forum.com/u/scrozier)\
**Post date:** [December 8, 2009, 9:50pm UTC](https://www.ruby-forum.com/t/using-authlogic-authenticatesmany-and-adding-accounts/179965/1 "2009-12-08T21:50:47Z")

</div>

I’ve read the following:

[http://rdoc.info/projects/binarylogic/authlogic](http://rdoc.info/projects/binarylogic/authlogic)  
(Module: Authlogic::AuthenticatesMany)

And from what I understand Authlogic will support users that all belong  
to one account. I’m in the process of thinking of how my model should  
be formed, and was hoping to get some pointers on how I could  
better/adjust the following:

ruby script/generate model Account account\_number:integer  
user\_id:integer is\_admin:boolean

I basically would like to each user to be tied to an account number, and  
also another indicator to tell whether that user is an admin.

Upon successful user registration, a new account is created and that  
user has the option to add additional users to their account only.

Would a model such as the one above be able to accomplish something like  
this? Do you think I’m missing something important?

In regards to using Authlogic, from what my mind can comprehend, it  
provides a way to associate users with accounts, but the foundation of  
having a model and controller still is required prior to using it.  
Would that be correct?
