Sha256: 77659d5d78a2d25d2c7d96605f0cbb0f38374f93c1a22f275ed75d35544f62fc
Contents?: true
Size: 725 Bytes
Versions: 4
Compression:
Stored size: 725 Bytes
Contents
class Spud::SetupController < Spud::ApplicationController layout 'spud/setup' def index @page_thumbnail = "spud/admin/users_thumb.png" @page_name = "First Time Setup" if SpudUser.all.count != 0 flash[:error] = "Access Denied! This wizard may only be executed when the database is empty." redirect_to spud_admin_root_url() and return end if request.post? @user = SpudUser.new(:login => params[:login],:email => params[:email],:password => params[:password],:password_confirmation => params[:password_confirmation]) @user.super_admin = true if @user.save redirect_to spud_admin_root_url() and return end flash[:error] = "Error creating administrative account!" else end end end
Version data entries
4 entries across 4 versions & 1 rubygems