Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def user_role_pages
- if current_user.role == 4
- @user_institutions=User.find(current_user.id)
- @institution= @user_institutions.institutions
- else
- @institution=Institution.all
- end
- if params[:role] == "2"
- render :partial=> "docentes", :locals=> {:institution=>@institution}
- else
- if params[:role] == "1"
- render :partial=> "user", :locals=> {:institution=>@institution}
- else
- if params[:role] == "4"
- render :partial=> "admin", :locals=> {:institution=>@institution}
- else
- if params[:role]=="5"
- render :partial=> "superadmin"
- else
- if params[:role] == "3"
- render :partial=> "supervisor_user"
- else
- if params[:role] == "6"
- render :partial=> "docenteadmin", :locals=> {:institution=>@institution}
- end
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement