質問編集履歴
1
欲しい答えをもらいやすくするため
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,11 +6,29 @@
|
|
6
6
|
|
7
7
|
```
|
8
8
|
|
9
|
+
class User < ApplicationRecord
|
10
|
+
|
11
|
+
# Include default devise modules. Others available are:
|
12
|
+
|
13
|
+
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
|
14
|
+
|
15
|
+
devise :database_authenticatable, :registerable,
|
16
|
+
|
17
|
+
:recoverable, :rememberable, :validatable
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
has_many :tasks
|
22
|
+
|
23
|
+
|
24
|
+
|
9
25
|
validates :name, :email, presence: true
|
10
26
|
|
11
27
|
validates :name, length: { maximum: 6 }
|
12
28
|
|
13
29
|
validates :password, format: { with: /\A(?=.*?[a-z])(?=.*?\d)[a-z\d]{6,100}\z/i}
|
30
|
+
|
31
|
+
end
|
14
32
|
|
15
33
|
```
|
16
34
|
|