回答編集履歴
1
修正
test
CHANGED
@@ -15,8 +15,6 @@
|
|
15
15
|
def after_sign_in_path_for(resource)
|
16
16
|
|
17
17
|
if current_user
|
18
|
-
|
19
|
-
# session[:id] = user.id
|
20
18
|
|
21
19
|
flash[:notice] = "ログイン成功"
|
22
20
|
|
@@ -54,9 +52,9 @@
|
|
54
52
|
|
55
53
|
def create
|
56
54
|
|
57
|
-
user = User.find_by(email: params[:email])
|
55
|
+
user = User.find_by(email: params[:session][:email])
|
58
56
|
|
59
|
-
if user && user.valid_password?(params[:password])
|
57
|
+
if user && user.valid_password?(params[:session][:password])
|
60
58
|
|
61
59
|
sign_in user
|
62
60
|
|