1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00

Fix callback not defined issue

This commit is contained in:
Daniel Barber 2017-07-18 18:15:49 -04:00
parent 8c6cef9d6a
commit 857a8ce290
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
2 changed files with 1 additions and 26 deletions

View File

@ -1,7 +1,7 @@
class SessionsController < ApplicationController
layout 'admin/login'
skip_before_action :require_login, only: [:new, :create]
skip_before_action :require_login, only: [:new, :create], raise: false
def new
end

View File

@ -1,25 +0,0 @@
class UsersController < ApplicationController
skip_before_action :require_login, only: [:new, :create]
def new
@user = User.new
end
def create
@user = sign_up(user_params)
if @user.valid?
sign_in(@user)
redirect_to root_path
else
render :new
end
end
private
def user_params
params.require(:user).permit(:email, :password)
end
end