質問編集履歴
2
コードの投稿の方法を変更しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,13 +38,11 @@
|
|
38
38
|
|
39
39
|
|
40
40
|
|
41
|
-
|
41
|
+
``` ruby
|
42
42
|
|
43
|
-
~book
|
43
|
+
~book_rb~
|
44
44
|
|
45
|
-
コード
|
46
45
|
|
47
|
-
```
|
48
46
|
|
49
47
|
class Book < ApplicationRecord
|
50
48
|
|
@@ -56,11 +54,17 @@
|
|
56
54
|
|
57
55
|
end
|
58
56
|
|
57
|
+
```
|
59
58
|
|
60
59
|
|
60
|
+
|
61
|
+
|
62
|
+
|
61
|
-
|
63
|
+
```ruby
|
62
64
|
|
63
65
|
~books_conttrole.rb~
|
66
|
+
|
67
|
+
|
64
68
|
|
65
69
|
def create
|
66
70
|
|
@@ -78,13 +82,13 @@
|
|
78
82
|
|
79
83
|
end
|
80
84
|
|
85
|
+
```
|
86
|
+
|
87
|
+
```ruby
|
88
|
+
|
89
|
+
~index_html_erb~
|
81
90
|
|
82
91
|
|
83
|
-
--------------------------------------------------------
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
~index_html_erb~
|
88
92
|
|
89
93
|
<% if @book.errors.any? %>
|
90
94
|
|
@@ -99,6 +103,12 @@
|
|
99
103
|
</ul>
|
100
104
|
|
101
105
|
<% end %>
|
106
|
+
|
107
|
+
```
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
102
112
|
|
103
113
|
|
104
114
|
|
1
コードの書き方編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,7 +40,11 @@
|
|
40
40
|
|
41
41
|
------------------------------------------------------
|
42
42
|
|
43
|
-
~book.rb~
|
43
|
+
~book.rb~```book.rb
|
44
|
+
|
45
|
+
コード
|
46
|
+
|
47
|
+
```
|
44
48
|
|
45
49
|
class Book < ApplicationRecord
|
46
50
|
|