質問編集履歴
1
viewファイルを追加しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -114,6 +114,132 @@
|
|
114
114
|
|
115
115
|
|
116
116
|
|
117
|
+
viewファイル
|
118
|
+
|
119
|
+
```rails
|
120
|
+
|
121
|
+
<div class="container">
|
122
|
+
|
123
|
+
<div class="row">
|
124
|
+
|
125
|
+
<div class="col--4" >
|
126
|
+
|
127
|
+
<div>
|
128
|
+
|
129
|
+
<h2>User Info</h2>
|
130
|
+
|
131
|
+
<table>
|
132
|
+
|
133
|
+
<tbody>
|
134
|
+
|
135
|
+
<tr>
|
136
|
+
|
137
|
+
<td><%= image_tag('sample-author1.jpg') %></td>
|
138
|
+
|
139
|
+
</tr>
|
140
|
+
|
141
|
+
<tr>
|
142
|
+
|
143
|
+
<td>name</td>
|
144
|
+
|
145
|
+
</tr>
|
146
|
+
|
147
|
+
<tr>
|
148
|
+
|
149
|
+
<td>introduction</td>
|
150
|
+
|
151
|
+
</tr>
|
152
|
+
|
153
|
+
</tbody>
|
154
|
+
|
155
|
+
</table>
|
156
|
+
|
157
|
+
<div class="row">
|
158
|
+
|
159
|
+
<a class="btn btn-outline-secondary btn-block fas fa-user-cog ">edit profile</a>
|
160
|
+
|
161
|
+
</div>
|
162
|
+
|
163
|
+
</div>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<h2>New book</h2>
|
168
|
+
|
169
|
+
<%= form_with model:@book,local:true do |f|%>
|
170
|
+
|
171
|
+
<label>Title</label>
|
172
|
+
|
173
|
+
<div class="field"><%= f.text_field :title %></div>
|
174
|
+
|
175
|
+
<label>Body</label>
|
176
|
+
|
177
|
+
<div class="field"><%= f.text_area :body %></div>
|
178
|
+
|
179
|
+
<%= f.submit'Create Book' %>
|
180
|
+
|
181
|
+
<% end %>
|
182
|
+
|
183
|
+
</div>
|
184
|
+
|
185
|
+
<div class="col-md-8">
|
186
|
+
|
187
|
+
<h1>Books</h1>
|
188
|
+
|
189
|
+
<table class="table table-striped">
|
190
|
+
|
191
|
+
<thead>
|
192
|
+
|
193
|
+
<tr>
|
194
|
+
|
195
|
+
<th clspan="1"></th>
|
196
|
+
|
197
|
+
<th>Title</th>
|
198
|
+
|
199
|
+
<th>Opinion</th>
|
200
|
+
|
201
|
+
</tr>
|
202
|
+
|
203
|
+
</thead>
|
204
|
+
|
205
|
+
<tbody>
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
<tr>
|
210
|
+
|
211
|
+
<% @books.each do |book| %>
|
212
|
+
|
213
|
+
<td>ユーザー画像</td>
|
214
|
+
|
215
|
+
<td><%= book.title %></td>
|
216
|
+
|
217
|
+
<td><%= book.body %></td>
|
218
|
+
|
219
|
+
<% end %>
|
220
|
+
|
221
|
+
</tr>
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
</tbody>
|
226
|
+
|
227
|
+
</table>
|
228
|
+
|
229
|
+
</div>
|
230
|
+
|
231
|
+
</div>
|
232
|
+
|
233
|
+
</div>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
```
|
240
|
+
|
241
|
+
|
242
|
+
|
117
243
|
|
118
244
|
|
119
245
|
自分で調べたことや試したこと
|