you can do it this way, as you can first check whose client is the username and apply some
for it, and include various css files for different layouts.
How am i doing
first I create a method in the application helper, but I can implement the layout by user roles that you
can do it according to customers.
def choose_layout if is_admin?(current_user) or is_super_admin?(current_user) 'admin' else 'application' end
And in the controller, call it before the filter, than the layout will be implemented according to the user
the roles
class AdministratorController < ApplicationController include ApplicationHelper layout :choose_layout def index @user = User.new @current_user = current_user end
end
hope you could get this idea .....
source share