質問編集履歴

2

ターミナル情報の追加

2018/01/10 06:49

投稿

komorigasa
komorigasa

スコア9

test CHANGED
File without changes
test CHANGED
@@ -253,3 +253,87 @@
253
253
  </div>
254
254
 
255
255
  ```
256
+
257
+
258
+
259
+ ###path
260
+
261
+ ```
262
+
263
+ Prefix Verb URI Pattern Controller#Action
264
+
265
+ listings GET /listings(.:format) listings#index
266
+
267
+ POST /listings(.:format) listings#create
268
+
269
+ new_listing GET /listings/new(.:format) listings#new
270
+
271
+ edit_listing GET /listings/:id/edit(.:format) listings#edit
272
+
273
+ listing GET /listings/:id(.:format) listings#show
274
+
275
+ PATCH /listings/:id(.:format) listings#update
276
+
277
+ PUT /listings/:id(.:format) listings#update
278
+
279
+ DELETE /listings/:id(.:format) listings#destroy
280
+
281
+ root GET / pages#index
282
+
283
+ new_user_session GET /users/sign_in(.:format) devise/sessions#new
284
+
285
+ user_session POST /users/sign_in(.:format) devise/sessions#create
286
+
287
+ destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
288
+
289
+ user_facebook_omniauth_authorize GET|POST /users/auth/facebook(.:format) users/omniauth_callbacks#passthru
290
+
291
+ user_facebook_omniauth_callback GET|POST /users/auth/facebook/callback(.:format) users/omniauth_callbacks#facebook
292
+
293
+ new_user_password GET /users/password/new(.:format) devise/passwords#new
294
+
295
+ edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
296
+
297
+ user_password PATCH /users/password(.:format) devise/passwords#update
298
+
299
+ PUT /users/password(.:format) devise/passwords#update
300
+
301
+ POST /users/password(.:format) devise/passwords#create
302
+
303
+ cancel_user_registration GET /users/cancel(.:format) registrations#cancel
304
+
305
+ new_user_registration GET /users/sign_up(.:format) registrations#new
306
+
307
+ edit_user_registration GET /users/edit(.:format) registrations#edit
308
+
309
+ user_registration PATCH /users(.:format) registrations#update
310
+
311
+ PUT /users(.:format) registrations#update
312
+
313
+ DELETE /users(.:format) registrations#destroy
314
+
315
+ POST /users(.:format) registrations#create
316
+
317
+ user GET /users/:id(.:format) users#show
318
+
319
+ listing_reservations POST /listings/:listing_id/reservations(.:format) reservations#create
320
+
321
+ GET /listings(.:format) listings#index
322
+
323
+ POST /listings(.:format) listings#create
324
+
325
+ GET /listings/new(.:format) listings#new
326
+
327
+ GET /listings/:id/edit(.:format) listings#edit
328
+
329
+ GET /listings/:id(.:format) listings#show
330
+
331
+ PATCH /listings/:id(.:format) listings#update
332
+
333
+ PUT /listings/:id(.:format) listings#update
334
+
335
+ DELETE /listings/:id(.:format) listings#destroy
336
+
337
+ manage_listing_basics GET /manage-listing/:id/basics(.:format) listings#basics
338
+
339
+ ```

1

showファイルの追記

2018/01/10 06:49

投稿

komorigasa
komorigasa

スコア9

test CHANGED
File without changes
test CHANGED
@@ -165,3 +165,91 @@
165
165
  end
166
166
 
167
167
  ```
168
+
169
+
170
+
171
+ ###show.html.erb (追記)
172
+
173
+ ```
174
+
175
+ <!-- 予約フォーム -->
176
+
177
+ <div class="col-md-3">
178
+
179
+ <div class="panel panel-default panel-show">
180
+
181
+ <div class="panel-heading">
182
+
183
+ <span style="font-size:16px;"><%= @listing.price %>円(1荷物(=1Kgまで)の料金)</span>
184
+
185
+ </div>
186
+
187
+
188
+
189
+ <div class="panel-body panel-real">
190
+
191
+ <%= form_for [@listing, @listing.reservations.new] do |f| %>
192
+
193
+
194
+
195
+
196
+
197
+ <!-- 予約時に一緒におくるデータ-->
198
+
199
+ <%= f.hidden_field :listing_id, value: @listing.id %>
200
+
201
+ <%= f.hidden_field :price, value: @listing.price %>
202
+
203
+ <%= f.hidden_field :total_price, id:'reservation_total_price' %>
204
+
205
+
206
+
207
+ <div class="row row-space-2">
208
+
209
+
210
+
211
+ <div class="col-md-6">
212
+
213
+ <label>欲しい商品の価格</label>
214
+
215
+ <div class="input-group">
216
+
217
+ <%= f.text_field :commodity_prices, :class => 'form-control', placeholder: '例: 1000' %>
218
+
219
+ <span class="input-group-addon" id="basic-addon2">円</span>
220
+
221
+ </div>
222
+
223
+ </div>
224
+
225
+
226
+
227
+
228
+
229
+ <div class="col-md-6">
230
+
231
+ <label>期限</label>
232
+
233
+ <%= f.text_field :by_time, :class => 'form-control', placeholder: '期限' %>
234
+
235
+ </div>
236
+
237
+ </div>
238
+
239
+
240
+
241
+ <div class="actions text-center">
242
+
243
+ <%= f.submit "予約する", class: "btn btn-danger btn-wide" %>
244
+
245
+ </div>
246
+
247
+ <% end %>
248
+
249
+ </div>
250
+
251
+ </div>
252
+
253
+ </div>
254
+
255
+ ```