Sha256: 0ea96caddec0514d16f40ed8657f24f5a0a679708fe200df9872827f0c7bb6ff
Contents?: true
Size: 725 Bytes
Versions: 2
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.count != 0 flash[:error] = "Access Denied! This wizard may only be executed when the database is empty." redirect_to spud_admin_login_path 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(spud_admin_login_path) and return end flash[:error] = "Error creating administrative account!" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tb_core-1.0.2 | app/controllers/spud/setup_controller.rb |
tb_core-1.0.1 | app/controllers/spud/setup_controller.rb |