1 class SystemController < ApplicationController
2 before_filter :authenticate_admin!, :except => [:start]
22 @admin = current_admin
23 respond_to do |format|
24 if @admin.create_token
25 format.html { redirect_to({:action => :auth_token}, {:notice => 'admin token was successfully created.'}) }
27 format.html { render action: "auth_token" }
33 current_admin.delete_token
34 respond_to do |format|
35 format.html { redirect_to :action => :auth_token}
40 @admin = Admin.find params[:id]
41 respond_to do |format|
43 format.html { redirect_to({:action => :waiting_list}, {:notice => 'admin was successfully approved.'}) }
45 format.html { render action: "waiting_list" }
51 @waits = Admin.find(:all, :conditions => ['approve = 0'])
55 @newadmin = Admin.find params[:id]
56 if admin_signed_in? and current_admin.activate
57 @newadmin.activate = 1
64 MagicNumber['test_layout'] = false
65 respond_to do |format|
66 format.html { render text: 'production', status: 200 }
71 MagicNumber['test_layout'] = 'test'
72 respond_to do |format|
73 format.html { render text: 'test', status: 200 }