質問編集履歴

1

modelのvalidationの記載漏れ

2015/12/10 04:54

投稿

ayu
ayu

スコア212

test CHANGED
File without changes
test CHANGED
@@ -19,6 +19,18 @@
19
19
 
20
20
 
21
21
  ・前提条件
22
+
23
+ ```
24
+
25
+ app/models/blog.rb
26
+
27
+ class Blog < ActiveRecord::Base
28
+
29
+ validates :name, presence: true
30
+
31
+ end
32
+
33
+ ```
22
34
 
23
35
  ```
24
36