質問編集履歴
2
修正依頼の回答として。
test
CHANGED
File without changes
|
test
CHANGED
@@ -130,6 +130,28 @@
|
|
130
130
|
|
131
131
|
end
|
132
132
|
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
private
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
def user_params
|
148
|
+
|
149
|
+
params.require(:user).permit(:name, :email, :password,
|
150
|
+
|
151
|
+
:password_confirmation, :introduction)
|
152
|
+
|
153
|
+
end
|
154
|
+
|
133
155
|
```
|
134
156
|
|
135
157
|
|
1
変更依頼への回答。
test
CHANGED
File without changes
|
test
CHANGED
@@ -96,4 +96,42 @@
|
|
96
96
|
|
97
97
|
|
98
98
|
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
Controller
|
104
|
+
|
105
|
+
```
|
106
|
+
|
107
|
+
def edit
|
108
|
+
|
109
|
+
@user = User.find(params[:id])
|
110
|
+
|
111
|
+
end
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
def update
|
116
|
+
|
117
|
+
@user = User.find(params[:id])
|
118
|
+
|
119
|
+
if @user.update(user_params)
|
120
|
+
|
121
|
+
flash[:success] = "Profile updated"
|
122
|
+
|
123
|
+
redirect_to @user
|
124
|
+
|
125
|
+
else
|
126
|
+
|
127
|
+
render 'edit'
|
128
|
+
|
129
|
+
end
|
130
|
+
|
131
|
+
end
|
132
|
+
|
133
|
+
```
|
134
|
+
|
135
|
+
|
136
|
+
|
99
137
|
よろしくお願いします。
|