回答編集履歴
2
追記
test
CHANGED
@@ -127,3 +127,15 @@
|
|
127
127
|
end
|
128
128
|
|
129
129
|
```
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
# 追記
|
134
|
+
|
135
|
+
`config/initializers/devise.rb`に以下の記述はありますか?
|
136
|
+
|
137
|
+
```
|
138
|
+
|
139
|
+
config.scoped_views = true
|
140
|
+
|
141
|
+
```
|
1
修正箇所提示
test
CHANGED
@@ -65,3 +65,65 @@
|
|
65
65
|
end
|
66
66
|
|
67
67
|
```
|
68
|
+
|
69
|
+
```diff
|
70
|
+
|
71
|
+
class DoctorsController < ApplicationController
|
72
|
+
|
73
|
+
def index
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
def new
|
80
|
+
|
81
|
+
@doctor = Doctor.new
|
82
|
+
|
83
|
+
end
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
def create
|
88
|
+
|
89
|
+
@doctor = Doctor.new(doctor_params)
|
90
|
+
|
91
|
+
if @doctor.save
|
92
|
+
|
93
|
+
redirect_to doctor_path
|
94
|
+
|
95
|
+
else
|
96
|
+
|
97
|
+
render 'new'
|
98
|
+
|
99
|
+
end
|
100
|
+
|
101
|
+
+ end #add end
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
def show
|
106
|
+
|
107
|
+
- @doctor = Doctor.find([:id]) #doctor typo
|
108
|
+
|
109
|
+
end
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
- end #remove end
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
private
|
120
|
+
|
121
|
+
def doctor_params
|
122
|
+
|
123
|
+
params.require(:doctor).permit(:doctor_name, :email, :password)
|
124
|
+
|
125
|
+
end
|
126
|
+
|
127
|
+
end
|
128
|
+
|
129
|
+
```
|