Sha256: 1b763663b858cc114cb934da20cd2bede2007063ab70f2d590cdbfc2dffaa292
Contents?: true
Size: 772 Bytes
Versions: 14
Compression:
Stored size: 772 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.count != 0 flash[:error] = "Access Denied! This wizard may only be executed when the database is empty." redirect_to new_spud_user_session_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 session[:return_to] = spud_admin_root_url redirect_to new_spud_user_session_url and return end flash[:error] = "Error creating administrative account!" end end end
Version data entries
14 entries across 14 versions & 1 rubygems