teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

エラー画面を掲載しておりませんでした。すみません。。。

2021/05/28 04:28

投稿

asdfghjkl123
asdfghjkl123

スコア1

title CHANGED
File without changes
body CHANGED
@@ -6,7 +6,9 @@
6
6
  ルーティング
7
7
  ---
8
8
  ````ruby on rails
9
+ Rails.application.routes.draw do
10
+
9
- get "/images", to: "images#index", as: :index
11
+  get "/images", to: "images#index", as: :index
10
12
 
11
13
  get "/images/new", to: "images#new", as: :new_image
12
14
  post "/images/new", to: "images#create"

3

エラー画面を掲載しておりませんでした。すみません。

2021/05/28 04:28

投稿

asdfghjkl123
asdfghjkl123

スコア1

title CHANGED
File without changes
body CHANGED
@@ -3,7 +3,8 @@
3
3
  エラーが解決できません…
4
4
  よろしくお願い致します。
5
5
 
6
-
6
+ ルーティング
7
+ ---
7
8
  ````ruby on rails
8
9
  get "/images", to: "images#index", as: :index
9
10
 
@@ -16,6 +17,9 @@
16
17
  get "/images/(:id)", to: "images#show"
17
18
  end
18
19
  ```
20
+
21
+ コントローラ
22
+ ---
19
23
  ```ruby on rails
20
24
  class ImagesController < ApplicationController
21
25
  layout "logged_in"
@@ -84,9 +88,10 @@
84
88
  end
85
89
  end
86
90
 
87
-
88
91
  ```
89
92
 
93
+ ビュー(edit)
94
+ ---
90
95
  ```Ruby on rails
91
96
  <% content_for :title, @title %>
92
97
 
@@ -109,6 +114,8 @@
109
114
 
110
115
  ```
111
116
 
117
+ ビュー(index)
118
+ ---
112
119
  ```Ruby on rails
113
120
 
114
121
  <% content_for :title, @title %>

2

エラー画面を掲載しておりませんでした。すみません・

2021/05/28 04:27

投稿

asdfghjkl123
asdfghjkl123

スコア1

title CHANGED
File without changes
body CHANGED
@@ -3,9 +3,9 @@
3
3
  エラーが解決できません…
4
4
  よろしくお願い致します。
5
5
 
6
+
6
- ルーティング
7
+ ````ruby on rails
7
- ---
8
- get "/images", to: "images#index", as: :index
8
+ get "/images", to: "images#index", as: :index
9
9
 
10
10
  get "/images/new", to: "images#new", as: :new_image
11
11
  post "/images/new", to: "images#create"
@@ -15,9 +15,8 @@
15
15
 
16
16
  get "/images/(:id)", to: "images#show"
17
17
  end
18
-
19
- コントローラ
20
- ---
18
+ ```
19
+ ```ruby on rails
21
20
  class ImagesController < ApplicationController
22
21
  layout "logged_in"
23
22
 
@@ -86,8 +85,9 @@
86
85
  end
87
86
 
88
87
 
89
- ビュー(edit)
90
- ---
88
+ ```
89
+
90
+ ```Ruby on rails
91
91
  <% content_for :title, @title %>
92
92
 
93
93
  <h2 class="title"><%= @title %></h2>
@@ -107,8 +107,10 @@
107
107
  <%= form.submit "投稿を更新" %>
108
108
  <% end %>
109
109
 
110
- ビュー(index)
111
- ---
110
+ ```
111
+
112
+ ```Ruby on rails
113
+
112
114
  <% content_for :title, @title %>
113
115
 
114
116
  <h2 class="title"><%= @title %></h2>
@@ -129,4 +131,6 @@
129
131
  <% if @images.empty? %>
130
132
  <li>出品している商品はありません。</li>
131
133
  <% end %>
132
- </ul>
134
+ </ul>
135
+
136
+ ```

1

エラー画面を掲載しておりませんでした。すみません・・・

2021/05/28 04:22

投稿

asdfghjkl123
asdfghjkl123

スコア1

title CHANGED
File without changes
body CHANGED
@@ -1,4 +1,4 @@
1
- 初心者です。
1
+ ![イメージ説明](d247a4f532b9da211c446af68f302484.png)初心者です。
2
2
  フリマアプリを作っています。商品の編集更新画面です。
3
3
  エラーが解決できません…
4
4
  よろしくお願い致します。