app/controllers/user_controller.rb
# a means for admins to see all jobs on the system
a means for admins to see all jobs on the system
a means for admins to see all jobs on the system
def list_users
    if !current_user.admin?
      redirect_to :jobs and return
    end
    @users = User.paginate :page => params[:page], :order => 'created_at DESC'
    respond_to do |format|
      format.html 
      format.xml  { render :xml => @jobs }
      format.json  { render :json => @jobs }
    end
  end
def list_users if ! current_user . admin? redirect_to :jobs and return end @users = User . paginate :page => params [ :page ] , :order => 'created_at DESC' respond_to do | format | format . html format . xml { render :xml => @jobs } format . json { render :json => @jobs } end end
a means for admins to see all jobs on the system
a means for admins to see all jobs on the system
# index.html.erb