質問編集履歴
3
controllerの追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -332,15 +332,73 @@
|
|
332
332
|
|
333
333
|
|
334
334
|
|
335
|
-
|
336
|
-
|
337
|
-
<% end %>
|
338
|
-
|
339
|
-
</div>
|
340
|
-
|
341
|
-
</div>
|
342
|
-
|
343
|
-
```
|
335
|
+
```
|
336
|
+
|
337
|
+
```ruby
|
338
|
+
|
339
|
+
class DoctorsController < ApplicationController
|
340
|
+
|
341
|
+
def index
|
342
|
+
|
343
|
+
end
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
def new
|
348
|
+
|
349
|
+
@doctor = Doctor.new
|
350
|
+
|
351
|
+
end
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
def create
|
356
|
+
|
357
|
+
@doctor = Doctor.new(doctor_params)
|
358
|
+
|
359
|
+
if @doctor.save
|
360
|
+
|
361
|
+
redirect_to doctor_path
|
362
|
+
|
363
|
+
else
|
364
|
+
|
365
|
+
render 'new'
|
366
|
+
|
367
|
+
end
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
def show
|
372
|
+
|
373
|
+
@doctorr = Doctor.find([:id])
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
end
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
end
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
private
|
388
|
+
|
389
|
+
def doctor_params
|
390
|
+
|
391
|
+
params.require(:doctor).permit(:doctor_name, :email, :password)
|
392
|
+
|
393
|
+
end
|
394
|
+
|
395
|
+
end
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
```
|
400
|
+
|
401
|
+
|
344
402
|
|
345
403
|
|
346
404
|
|
2
controllerの追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -338,9 +338,7 @@
|
|
338
338
|
|
339
339
|
</div>
|
340
340
|
|
341
|
-
|
342
|
-
|
343
|
-
|
341
|
+
</div>
|
344
342
|
|
345
343
|
```
|
346
344
|
|
1
controllerの追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -332,6 +332,8 @@
|
|
332
332
|
|
333
333
|
|
334
334
|
|
335
|
+
|
336
|
+
|
335
337
|
<% end %>
|
336
338
|
|
337
339
|
</div>
|