質問編集履歴
1
質問に対する追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -91,3 +91,69 @@
|
|
91
91
|
|
92
92
|
|
93
93
|
```
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
#追記
|
98
|
+
|
99
|
+
ログイン周りはdeviseというgemを使用しており、session controllerに関してはデフォルトで使用しています。
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
```ruby
|
104
|
+
|
105
|
+
# frozen_string_literal: true
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
class Users::SessionsController < Devise::SessionsController
|
110
|
+
|
111
|
+
# before_action :configure_sign_in_params, only: [:create]
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
# GET /resource/sign_in
|
116
|
+
|
117
|
+
# def new
|
118
|
+
|
119
|
+
# super
|
120
|
+
|
121
|
+
# end
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
# POST /resource/sign_in
|
126
|
+
|
127
|
+
# def create
|
128
|
+
|
129
|
+
# super
|
130
|
+
|
131
|
+
# end
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
# DELETE /resource/sign_out
|
136
|
+
|
137
|
+
# def destroy
|
138
|
+
|
139
|
+
# super
|
140
|
+
|
141
|
+
# end
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
# protected
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
# If you have extra params to permit, append them to the sanitizer.
|
150
|
+
|
151
|
+
# def configure_sign_in_params
|
152
|
+
|
153
|
+
# devise_parameter_sanitizer.permit(:sign_in, keys: [:attribute])
|
154
|
+
|
155
|
+
# end
|
156
|
+
|
157
|
+
end
|
158
|
+
|
159
|
+
```
|