質問編集履歴
1
編集・追記依頼の補足
test
CHANGED
File without changes
|
test
CHANGED
@@ -184,6 +184,64 @@
|
|
184
184
|
|
185
185
|
```
|
186
186
|
|
187
|
-
|
188
|
-
|
189
187
|
初めてこの質問をサービスを使うので、至らない点がありますが、ご回答お待ちしております。
|
188
|
+
|
189
|
+
### 補足
|
190
|
+
|
191
|
+
```ruby
|
192
|
+
|
193
|
+
# == Schema Information
|
194
|
+
|
195
|
+
#
|
196
|
+
|
197
|
+
# Table name: boards
|
198
|
+
|
199
|
+
#
|
200
|
+
|
201
|
+
# id :bigint not null, primary key
|
202
|
+
|
203
|
+
# body :text(65535)
|
204
|
+
|
205
|
+
# city :string(255)
|
206
|
+
|
207
|
+
# image :string(255)
|
208
|
+
|
209
|
+
# name :string(255)
|
210
|
+
|
211
|
+
# created_at :datetime not null
|
212
|
+
|
213
|
+
# updated_at :datetime not null
|
214
|
+
|
215
|
+
#
|
216
|
+
|
217
|
+
class Board < ApplicationRecord
|
218
|
+
|
219
|
+
validates :name, presence: true, length: { maximum: 20 }
|
220
|
+
|
221
|
+
validates :body, presence: true, length: { maximum: 1000 }
|
222
|
+
|
223
|
+
end
|
224
|
+
|
225
|
+
```
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
```table
|
230
|
+
|
231
|
+
--------------------------+----------------------------+----------------------------+
|
232
|
+
|
233
|
+
| id | name | city | body | image | created_at | updated_at |
|
234
|
+
|
235
|
+
+----+-----------------------------+-----------------------------------------------------------+-----------------+----------------------------------------------------------+----------------------------+----------------------------+
|
236
|
+
|
237
|
+
| 3 | Fate/stay night | 兵庫県神戸市中央区北野町3丁目13−3 | 風見鶏の館 | #<ActionDispatch::Http::UploadedFile:0x00007fac59b7c2a0> | 2020-05-08 14:58:50.611866 | 2020-05-08 14:58:50.611866 |
|
238
|
+
|
239
|
+
| 5 | ひぐらしのなく頃に | 岐阜県大野郡白川村荻町1086 白川郷 | 圭一の家 | #<ActionDispatch::Http::UploadedFile:0x00007fac59b6c080> | 2020-05-13 16:29:52.713192 | 2020-05-13 16:29:52.713192 |
|
240
|
+
|
241
|
+
+----+-----------------------------+-----------------------------------------------------------+-----------------+----------------------------------------------------------+----------------------------+----------------------------+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
```
|
246
|
+
|
247
|
+
補足を加えました。上がBoard classで下がBoardテーブルです。
|