Forum: Ruby on Rails How to design controllers and views for - STI - Multiple us

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
42236b2e9859805bf11f6cd25b6bc6a5?d=identicon&s=25 Ajay kumar Guthikonda (aroop)
on 2007-07-30 17:20
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
This topic is locked and can not be replied to.