Sha256: 7c0ef0cf183bc95fd17093ea9f9e7238cc72cbdaa53d62b105a91cc25cc575bc
Contents?: true
Size: 733 Bytes
Versions: 36
Compression:
Stored size: 733 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 redirect_back_or_default(new_spud_user_session_url) and return end flash[:error] = "Error creating administrative account!" end end end
Version data entries
36 entries across 36 versions & 2 rubygems