The easiest way is to use genarators
rails g controller 'student/users' new create etc.
or
rails g controller student::users
When you want to add another controller:
rails g controller student::classes
This creates automatically the necessary structure for the controller and the views.
Then add in your routes:
namespace :student do
resources :users
resources :classes
end
You can use route helpers like new_student_user_path
With a non-namespaced controller you'd typically type form_for @user to create a user, with a namespaced:
<%= form_for [:student, @user] do |f| %>
...
Btw if the difference between the users is just their abilities it's better to use a gem like cancan or declarative_authorization to manage authorization.
If you store different information for each type you could make a single user model with a polymorphic relationship to different profiles.
More info:
How to model different users in Rails
Rails App with 3 different types of Users
......................................
Edit
You can set the layout from application_controller. I guess upon signing in you could store the layout in the cookies or the session hash: session[:layout] = 'student'
layout :set_layout
def set_layout
session[:layout] || 'application'
end
Or if you have a current_user method which gets the user you could check its class and choose the layout.
I strongly advise you to reconsider splitting the user class. Different user models will lead to repeated logic and complicated authentication.