Removed "authlogic" completely. Let's try "devise".

This commit is contained in:
Christoph Haas 2015-07-15 17:05:56 +02:00
parent 4b4cbf4b88
commit e6a0f15340
26 changed files with 10 additions and 260 deletions

View file

@ -1,43 +0,0 @@
class UsersController < ApplicationController
before_filter :require_user, :only => [:show, :edit, :update]
def new
@user = User.new
end
def create
@user = User.new(params[:user])
# Saving without session maintenance to skip
# auto-login which can't happen here because
# the User has not yet been activated
if @user.save
flash[:notice] = "Your account has been created."
redirect_to signup_url
else
flash[:notice] = "There was a problem creating you."
render :action => :new
end
end
def show
@user = current_user
end
def edit
@user = current_user
end
def update
@user = current_user # makes our views "cleaner" and more consistent
if @user.update_attributes(params[:user])
flash[:notice] = "Account updated!"
redirect_to account_url
else
render :action => :edit
end
end
end