質問編集履歴
1
userモデルを書き忘れておりましたので追記します。
title
CHANGED
File without changes
|
body
CHANGED
@@ -110,6 +110,24 @@
|
|
110
110
|
|
111
111
|
```
|
112
112
|
|
113
|
+
```app/models/user.rb
|
114
|
+
class User < ApplicationRecord
|
115
|
+
# Include default devise modules. Others available are:
|
116
|
+
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
|
117
|
+
devise :database_authenticatable, :registerable,
|
118
|
+
:recoverable, :rememberable, :validatable
|
119
|
+
|
120
|
+
has_one_attached :profile_image
|
121
|
+
|
122
|
+
has_many :services, dependent: :destroy
|
123
|
+
has_many :movies, dependent: :destroy
|
124
|
+
|
125
|
+
#プロフィール画面でのみバリデーションがかかるように
|
126
|
+
validates :user_name, presence: true, on: :update
|
127
|
+
end
|
128
|
+
|
129
|
+
```
|
130
|
+
|
113
131
|
## 補足
|
114
132
|
rails 7
|
115
133
|
ruby3.1.1
|