質問編集履歴
2
user.rbの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -498,6 +498,56 @@
|
|
498
498
|
|
499
499
|
```
|
500
500
|
|
501
|
+
app/models/user.rb
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
```ここに言語を入力
|
506
|
+
|
507
|
+
# == Schema Information
|
508
|
+
|
509
|
+
#
|
510
|
+
|
511
|
+
# Table name: users
|
512
|
+
|
513
|
+
#
|
514
|
+
|
515
|
+
# id :bigint not null, primary key
|
516
|
+
|
517
|
+
# admin :boolean default(FALSE)
|
518
|
+
|
519
|
+
# email :string(255)
|
520
|
+
|
521
|
+
# name :string(255)
|
522
|
+
|
523
|
+
# password_digest :string(255)
|
524
|
+
|
525
|
+
# remember_digest :string(255)
|
526
|
+
|
527
|
+
# created_at :datetime not null
|
528
|
+
|
529
|
+
# updated_at :datetime not null
|
530
|
+
|
531
|
+
#
|
532
|
+
|
533
|
+
# Indexes
|
534
|
+
|
535
|
+
#
|
536
|
+
|
537
|
+
# index_users_on_email (email) UNIQUE
|
538
|
+
|
539
|
+
#
|
540
|
+
|
541
|
+
class User < ApplicationRecord
|
542
|
+
|
543
|
+
has_many :lists, dependent: :destroy
|
544
|
+
|
545
|
+
end
|
546
|
+
|
547
|
+
|
548
|
+
|
549
|
+
```
|
550
|
+
|
501
551
|
|
502
552
|
|
503
553
|
### 試したこと
|
1
加筆
test
CHANGED
File without changes
|
test
CHANGED
@@ -84,9 +84,9 @@
|
|
84
84
|
|
85
85
|
### 該当のソースコード
|
86
86
|
|
87
|
-
|
88
|
-
|
89
|
-
|
87
|
+
db/seeds.rb
|
88
|
+
|
89
|
+
```
|
90
90
|
|
91
91
|
user = User.all
|
92
92
|
|
@@ -206,9 +206,9 @@
|
|
206
206
|
|
207
207
|
```
|
208
208
|
|
209
|
-
|
209
|
+
app/models/list.rb
|
210
|
-
|
210
|
+
|
211
|
-
```
|
211
|
+
```
|
212
212
|
|
213
213
|
# == Schema Information
|
214
214
|
|
@@ -276,9 +276,9 @@
|
|
276
276
|
|
277
277
|
```
|
278
278
|
|
279
|
-
|
280
|
-
|
281
|
-
|
279
|
+
app/controllers/lists_controller.rb
|
280
|
+
|
281
|
+
```
|
282
282
|
|
283
283
|
class ListsController < ApplicationController
|
284
284
|
|
@@ -378,9 +378,9 @@
|
|
378
378
|
|
379
379
|
```
|
380
380
|
|
381
|
-
|
382
|
-
|
383
|
-
|
381
|
+
app/helpers/sessions_helper.rb
|
382
|
+
|
383
|
+
```
|
384
384
|
|
385
385
|
module SessionsHelper
|
386
386
|
|