teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

コメントで表記依頼があったため

2019/09/10 00:37

投稿

takumikai
takumikai

スコア16

title CHANGED
File without changes
body CHANGED
@@ -80,4 +80,83 @@
80
80
  4|lll|2|2019-09-07 07:13:13.366874|2019-09-07 07:13:13.366874
81
81
  5|9月7日 : 2つめのリスト|2|2019-09-07 07:14:20.287058|2019-09-07 07:14:20.287058
82
82
  6|9/7 -no2|2|2019-09-07 08:41:49.370980|2019-09-07 08:41:49.370980
83
+ ```
84
+
85
+ **↓ create_users.rb**
86
+ ```rb
87
+ # frozen_string_literal: true
88
+
89
+ class DeviseCreateUsers < ActiveRecord::Migration[5.2]
90
+ def change
91
+ create_table :users do |t|
92
+ ## Database authenticatable
93
+ t.string :email, null: false, default: ""
94
+ t.string :encrypted_password, null: false, default: ""
95
+
96
+ ## Recoverable
97
+ t.string :reset_password_token
98
+ t.datetime :reset_password_sent_at
99
+
100
+ ## Rememberable
101
+ t.datetime :remember_created_at
102
+
103
+ ## Trackable
104
+ # t.integer :sign_in_count, default: 0, null: false
105
+ # t.datetime :current_sign_in_at
106
+ # t.datetime :last_sign_in_at
107
+ # t.string :current_sign_in_ip
108
+ # t.string :last_sign_in_ip
109
+
110
+ ## Confirmable
111
+ # t.string :confirmation_token
112
+ # t.datetime :confirmed_at
113
+ # t.datetime :confirmation_sent_at
114
+ # t.string :unconfirmed_email # Only if using reconfirmable
115
+
116
+ ## Lockable
117
+ # t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
118
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
119
+ # t.datetime :locked_at
120
+
121
+
122
+ t.timestamps null: false
123
+ end
124
+
125
+ add_index :users, :email, unique: true
126
+ add_index :users, :reset_password_token, unique: true
127
+ # add_index :users, :confirmation_token, unique: true
128
+ # add_index :users, :unlock_token, unique: true
129
+ end
130
+ end
131
+
132
+ ```
133
+
134
+ **↓ create_lists.rb**
135
+ ```rb
136
+ class CreateLists < ActiveRecord::Migration[5.2]
137
+ def change
138
+ create_table :lists do |t|
139
+
140
+ t.string :title, null: false, limit: 255
141
+ t.references :user, null: false
142
+
143
+ t.timestamps
144
+ end
145
+ end
146
+ end
147
+ ```
148
+
149
+ **↓ create_cards.rb**
150
+ ```class CreateCards < ActiveRecord::Migration[5.2]
151
+ def change
152
+ create_table :cards do |t|
153
+
154
+ t.string :title, null: false
155
+ t.references :list, null: false
156
+
157
+ t.timestamps
158
+ end
159
+ end
160
+ end
161
+
83
162
  ```

1

理想のイメージを伝えきれてないと思い、投稿しました

2019/09/10 00:37

投稿

takumikai
takumikai

スコア16

title CHANGED
File without changes
body CHANGED
@@ -1,6 +1,10 @@
1
1
  ### □ こういう↓ 「リスト>todoカード」のデータが表示されるアプリをRailsで作っているのですが
2
2
  ![イメージ説明](87280c899d6e961d2054752f94b40f33.png)
3
3
 
4
+ ↓理想のイメージ↓
5
+ - 月/日ごとに、コンテンツがまとまっていて、並んでいる
6
+ ![イメージ説明](48d6e92a83b03f7b7b2d40954ef0afa1.png)
7
+
4
8
  ###### やりたいこと
5
9
  ● created_atの日付ごとに、セクションを分けて表示したい
6
10