質問編集履歴
1
schema追加しました
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,7 +9,8 @@
|
|
9
9
|
|
10
10
|
下記はapplication_controller.rbで会員登録とログインのストロングパラメーターを設定しています。
|
11
11
|
|
12
|
-
|
12
|
+
application_controller.rb
|
13
|
+
````
|
13
14
|
class ApplicationController < ActionController::Base
|
14
15
|
before_action :authenticate_user!, except: [:top]
|
15
16
|
before_action :configure_permitted_parameters, if: :devise_controller?
|
@@ -29,9 +30,11 @@
|
|
29
30
|
devise_parameter_sanitizer.permit(:sign_in, keys: [:nickname, :email])
|
30
31
|
end
|
31
32
|
|
32
|
-
```
|
33
|
+
```
|
33
34
|
|
34
|
-
|
35
|
+
sessions/new.html.erb
|
36
|
+
```
|
37
|
+
|
35
38
|
<div class = "container">
|
36
39
|
|
37
40
|
<h2>Log in</h2>
|
@@ -65,7 +68,27 @@
|
|
65
68
|
</div>
|
66
69
|
```
|
67
70
|
|
71
|
+
schema.rb
|
72
|
+
`````
|
73
|
+
create_table "users", force: :cascade do |t|
|
74
|
+
t.string "email", default: "", null: false
|
75
|
+
t.string "encrypted_password", default: "", null: false
|
76
|
+
t.string "reset_password_token"
|
77
|
+
t.datetime "reset_password_sent_at"
|
78
|
+
t.datetime "remember_created_at"
|
79
|
+
t.string "name"
|
80
|
+
t.string "nickname"
|
81
|
+
t.string "profile_image_id"
|
82
|
+
t.string "introduction"
|
83
|
+
t.datetime "created_at", null: false
|
84
|
+
t.datetime "updated_at", null: false
|
85
|
+
t.index ["email"], name: "index_users_on_email", unique: true
|
86
|
+
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
87
|
+
end
|
88
|
+
`````
|
89
|
+
|
68
90
|
【対策と自分の考え】
|
91
|
+
|
69
92
|
①下記の記事を参考にsessoins_controllerにもnicknameを追記しましたが、
|
70
93
|
errorの解消ができていない状態です。
|
71
94
|
|