1 class SystemController < ApplicationController
2 before_filter :authenticate_admin!, :except => [:start]
20 @admin = current_admin
21 respond_to do |format|
22 if @admin.create_token
23 format.html { redirect_to({:action => :auth_token}, {:notice => 'admin token was successfully created.'}) }
25 format.html { render action: "auth_token" }
31 current_admin.delete_token
32 respond_to do |format|
33 format.html { redirect_to :action => :auth_token}
38 @admin = Admin.find params[:id]
39 respond_to do |format|
41 format.html { redirect_to({:action => :waiting_list}, {:notice => 'admin was successfully approved.'}) }
43 format.html { render action: "waiting_list" }
49 @waits = Admin.find(:all, :conditions => ['approve = 0'])
53 @newadmin = Admin.find params[:id]
54 if admin_signed_in? and current_admin.activate
55 @newadmin.activate = 1