質問編集履歴
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -76,6 +76,42 @@
|
|
76
76
|
|
77
77
|
|
78
78
|
|
79
|
+
**book.rb**
|
80
|
+
|
81
|
+
```ここに言語を入力
|
82
|
+
|
83
|
+
class Book < ApplicationRecord
|
84
|
+
|
85
|
+
belongs_to :publisher
|
86
|
+
|
87
|
+
end
|
88
|
+
|
89
|
+
```
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
**publisher.rb**
|
94
|
+
|
95
|
+
```ここに言語を入力
|
96
|
+
|
97
|
+
class Publisher < ApplicationRecord
|
98
|
+
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
```
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
79
115
|
|
80
116
|
|
81
117
|
**hello/index.html.erb**
|
@@ -154,6 +190,38 @@
|
|
154
190
|
|
155
191
|
|
156
192
|
|
193
|
+
選択肢を変えたときの
|
194
|
+
|
195
|
+
**ターミナルの反応**
|
196
|
+
|
197
|
+
getは動いている模様
|
198
|
+
|
199
|
+
```ここに言語を入力
|
200
|
+
|
201
|
+
Started GET "/hello/index?publisher_id=1" for 127.0.0.1 at 2017-06-01 18:44:38 +0900
|
202
|
+
|
203
|
+
Processing by HelloController#index as */*
|
204
|
+
|
205
|
+
Parameters: {"publisher_id"=>"1"}
|
206
|
+
|
207
|
+
Rendering hello/index.html.erb within layouts/application
|
208
|
+
|
209
|
+
Publisher Load (0.1ms) SELECT "publishers".* FROM "publishers"
|
210
|
+
|
211
|
+
Book Load (0.1ms) SELECT "books".* FROM "books"
|
212
|
+
|
213
|
+
Rendered hello/index.html.erb within layouts/application (2.1ms)
|
214
|
+
|
215
|
+
Completed 200 OK in 76ms (Views: 61.3ms | ActiveRecord: 0.3ms)
|
216
|
+
|
217
|
+
```
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
book.js.erbが実行されていない?
|
222
|
+
|
223
|
+
|
224
|
+
|
157
225
|
|
158
226
|
|
159
227
|
|
1
写真追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -151,3 +151,11 @@
|
|
151
151
|
end
|
152
152
|
|
153
153
|
```
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
![イメージ説明](1048cd9fed99f028fd0cf91c3d75f519.png)
|