質問編集履歴
1
registrationcontrollerを追記しました・
test
CHANGED
File without changes
|
test
CHANGED
@@ -78,4 +78,48 @@
|
|
78
78
|
|
79
79
|
|
80
80
|
|
81
|
+
> registrations_controller.rb
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
|
87
|
+
class RegistrationsController < Devise::RegistrationsController
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
protected
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
def update_resource(resource, params)
|
96
|
+
|
97
|
+
resource.update_without_password(params)
|
98
|
+
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
def account_update_params
|
104
|
+
|
105
|
+
devise_parameter_sanitizer.sanitize(:account_update)
|
106
|
+
|
107
|
+
end
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
def account_update
|
112
|
+
|
113
|
+
params(:user).permit(:name, :email, :background, :description, :website, :image, :user_image_id, user_images_attributes: [:cover_image])
|
114
|
+
|
115
|
+
end
|
116
|
+
|
117
|
+
end
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
```
|
122
|
+
|
123
|
+
|
124
|
+
|
81
125
|
name、email、gendeは更新できるのですが、なぜか、passport、hobby、user_imagesが保存されません。。
|