# How to design controllers and views for - STI - Multiple us

**URL:** <https://www.ruby-forum.com/t/how-to-design-controllers-and-views-for-sti-multiple-us/110754>\
**Category:** Rails\
**Created:** [July 30, 2007, 5:20pm UTC](https://www.ruby-forum.com/t/how-to-design-controllers-and-views-for-sti-multiple-us/110754 "2007-07-30T17:20:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ag367e](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@ag367e](https://www.ruby-forum.com/u/ag367e)\
**Post date:** [July 30, 2007, 5:20pm UTC](https://www.ruby-forum.com/t/how-to-design-controllers-and-views-for-sti-multiple-us/110754/1 "2007-07-30T17:20:37Z")

</div>

Hi,

In the free time I am developing a rails based job portal and I am new  
to both web development and rails.

In my application there are different types of users like employers, job  
seekers, moderators and administrator. I have implemented the DB stuff  
in STI (Single table inheritance).

_Models_

- class Employer \< User
- class JobSeeker \< User
- class Moderator \< User
- class Administrator \< User

I am using act as authenticated as the authentication system.

Right now I have different controllers for login/logout and users  
management

_Controllers_

- UsersController (for user management like new user, change password,  
verification, activation, forgot password)
- AccountsController (for login and logout)

What would be the best way to deign my application so that I DRY my  
actions and views for different type of users that I have.

Thanks,  
Ajay
