質問編集履歴
3
ginfo_controller new修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -204,6 +204,8 @@
|
|
204
204
|
|
205
205
|
def new #修正
|
206
206
|
|
207
|
+
@user=User.find(params[:id])
|
208
|
+
|
207
209
|
@info=Info.new(params.require(:info).permit(:age, :sex, :tel_number,:face_picture, :user_id))
|
208
210
|
|
209
211
|
|
2
local:true 追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -260,7 +260,7 @@
|
|
260
260
|
|
261
261
|
super(resource)
|
262
262
|
|
263
|
-
|
263
|
+
infos_new_path(@user.id) #修正
|
264
264
|
|
265
265
|
end
|
266
266
|
|
@@ -360,7 +360,7 @@
|
|
360
360
|
|
361
361
|
```ここに言語を入力
|
362
362
|
|
363
|
-
<%= form_with url: infos_new_path do |f| %>
|
363
|
+
<%= form_with url: infos_new_path, local: true do |f| %>
|
364
364
|
|
365
365
|
class="fas fa-cog fa-fw"></i> BASIC INFO</u></h3>
|
366
366
|
|
1
registartion_controller infos_controllerの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,6 +4,8 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
|
7
|
+
*ご回答を受けて修正しました。
|
8
|
+
|
7
9
|
前提>>
|
8
10
|
|
9
11
|
deviseを入れています。
|
@@ -200,17 +202,19 @@
|
|
200
202
|
|
201
203
|
|
202
204
|
|
203
|
-
def new
|
205
|
+
def new #修正
|
204
|
-
|
206
|
+
|
205
|
-
@info=Info.new
|
207
|
+
@info=Info.new(params.require(:info).permit(:age, :sex, :tel_number,:face_picture, :user_id))
|
206
|
-
|
208
|
+
|
209
|
+
|
210
|
+
|
207
|
-
end
|
211
|
+
end
|
208
|
-
|
209
|
-
|
210
|
-
|
212
|
+
|
213
|
+
|
214
|
+
|
211
|
-
def create
|
215
|
+
def create #修正
|
212
|
-
|
216
|
+
|
213
|
-
@info=Info.new
|
217
|
+
@info=Info.new(params.require(:info).permit(:age, :sex, :tel_number,:face_picture, :user_id))
|
214
218
|
|
215
219
|
@info.save
|
216
220
|
|
@@ -244,13 +248,27 @@
|
|
244
248
|
|
245
249
|
# The path used after sign up.
|
246
250
|
|
251
|
+
class Users::RegistrationsController < Devise::RegistrationsController
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
# The path used after sign up.
|
258
|
+
|
247
259
|
def after_sign_up_path_for(resource)
|
248
260
|
|
249
261
|
super(resource)
|
250
262
|
|
251
|
-
ginfos_new_path
|
263
|
+
ginfos_new_path(@user.id) #修正
|
252
|
-
|
264
|
+
|
253
|
-
end
|
265
|
+
end
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
end
|
254
272
|
|
255
273
|
|
256
274
|
|