1 class SystemController < ApplicationController
2 before_filter :authenticate_admin!, :except => [:start]
19 @admin = current_admin
20 respond_to do |format|
21 if @admin.create_token
22 format.html { redirect_to({:action => :auth_token}, {:notice => 'admin token was successfully created.'}) }
24 format.html { render action: "auth_token" }
30 current_admin.delete_token
31 respond_to do |format|
32 format.html { redirect_to :action => :auth_token}
37 @admin = Admin.find params[:id]
38 respond_to do |format|
40 format.html { redirect_to({:action => :waiting_list}, {:notice => 'admin was successfully approved.'}) }
42 format.html { render action: "waiting_list" }
48 @waits = Admin.find(:all, :conditions => ['approve = 0'])
52 @newadmin = Admin.find params[:id]
53 if admin_signed_in? and current_admin.activate
54 @newadmin.activate = 1
61 MagicNumber['test_layout'] = false
62 respond_to do |format|
63 format.html { render text: 'production', status: 200 }
68 MagicNumber['test_layout'] = 'test'
69 respond_to do |format|
70 format.html { render text: 'test', status: 200 }