質問編集履歴
1
ソースコードとエラーの内容が異なっていたため、修正致しました。(ActionActivationControllerのeditアクションの部分)
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -25,8 +25,7 @@
|
|
|
25
25
|
def edit
|
|
26
26
|
user = User.find_by(email: params[:email])
|
|
27
27
|
if user && !user.activated? && user.authenticated?(:activation, params[:id])
|
|
28
|
-
user.
|
|
28
|
+
user.activate
|
|
29
|
-
user.update_attribute(:activated_at, Time.zone.now)
|
|
30
29
|
log_in user
|
|
31
30
|
flash[:success] = "Account activated!"
|
|
32
31
|
redirect_to user
|