質問編集履歴
7
タグ
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
6
書式
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,12 +1,18 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
|
-
|
3
|
-
|
4
2
|
|
5
3
|
```
|
6
4
|
|
7
|
-
|
5
|
+
one.html.erbというviewの「計算する」というボタンをクリックすると、同じhomeコントロール上のresultアクションに対応したresult.html.erbを表示させたい
|
8
6
|
|
7
|
+
```
|
8
|
+
|
9
|
+
![one.html.erb](58e9557d5cd2fb52169d74df573d4200.png)
|
10
|
+
|
11
|
+
###現状
|
12
|
+
|
13
|
+
```
|
14
|
+
|
9
|
-
|
15
|
+
「計算する」というボタンをクリックしても画面が変わらないが、ターミナル上では
|
10
16
|
|
11
17
|
Rendering home/result.html.erb within layouts/application
|
12
18
|
|
@@ -15,6 +21,8 @@
|
|
15
21
|
と表示されている。
|
16
22
|
|
17
23
|
```
|
24
|
+
|
25
|
+
|
18
26
|
|
19
27
|
###ターミナル
|
20
28
|
|
5
書式
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
コントローラー上でのrender
|
1
|
+
【Rails】コントローラー上でのrenderでの移動ができない
|
test
CHANGED
File without changes
|
4
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
目的、 one.html.erbというviewのsubmitをクリックすると、同じhomeコントロール上のresultアクションに対応したresult.html.erbを表示させたい
|
8
8
|
|
9
|
-
現状、submitをクリックしても画面が変わらないが、ターミナル上では
|
9
|
+
現状、submitをクリックしても画面が変わらないが、ターミナル上では
|
10
10
|
|
11
11
|
Rendering home/result.html.erb within layouts/application
|
12
12
|
|
3
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -64,7 +64,7 @@
|
|
64
64
|
|
65
65
|
1, one.html.erb
|
66
66
|
|
67
|
-
```html.erb
|
67
|
+
```html.erb
|
68
68
|
|
69
69
|
<h1>入力</h1>
|
70
70
|
|
2
書式
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,11 +14,51 @@
|
|
14
14
|
|
15
15
|
と表示されている。
|
16
16
|
|
17
|
+
```
|
18
|
+
|
19
|
+
###ターミナル
|
20
|
+
|
21
|
+
```
|
22
|
+
|
23
|
+
[上半分がone.html.erbにアクセスした時の表示、下半分がsubmitをクリックしたときの表示]
|
17
24
|
|
18
25
|
|
26
|
+
|
27
|
+
Started POST "/count?local=true" for ::1 at 2021-04-14 12:09:08 +0900
|
28
|
+
|
29
|
+
Processing by HomeController#count as JS
|
30
|
+
|
31
|
+
Parameters: {"authenticity_token"=>"SqQs5wSdOqTSUOWNPoCHHt2Leof+xODA039AEPruoVVd9cVZENpkw5AFU4mbM1xnqFdv4Zqo2jsvxm9P1+UNXA==", "p1"=>"3", "commit"=>"計算する", "local"=>"true"}
|
32
|
+
|
33
|
+
Rendering home/result.html.erb within layouts/application
|
34
|
+
|
19
|
-
|
35
|
+
Rendered home/result.html.erb within layouts/application (Duration: 0.0ms | Allocations: 4)
|
36
|
+
|
37
|
+
[Webpacker] Everything's up-to-date. Nothing to do
|
38
|
+
|
39
|
+
Completed 200 OK in 11ms (Views: 9.6ms | ActiveRecord: 0.0ms | Allocations: 4111)
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
Started POST "/count?local=true" for ::1 at 2021-04-14 12:09:09 +0900
|
46
|
+
|
47
|
+
Processing by HomeController#count as JS
|
48
|
+
|
49
|
+
Parameters: {"authenticity_token"=>"SqQs5wSdOqTSUOWNPoCHHt2Leof+xODA039AEPruoVVd9cVZENpkw5AFU4mbM1xnqFdv4Zqo2jsvxm9P1+UNXA==", "p1"=>"3", "commit"=>"計算する", "local"=>"true"}
|
50
|
+
|
51
|
+
Rendering home/result.html.erb within layouts/application
|
52
|
+
|
53
|
+
Rendered home/result.html.erb within layouts/application (Duration: 0.2ms | Allocations: 4)
|
54
|
+
|
55
|
+
[Webpacker] Everything's up-to-date. Nothing to do
|
56
|
+
|
57
|
+
Completed 200 OK in 11ms (Views: 9.3ms | ActiveRecord: 0.0ms | Allocations: 4113)
|
20
58
|
|
21
59
|
```
|
60
|
+
|
61
|
+
|
22
62
|
|
23
63
|
###現状コード
|
24
64
|
|
1
画像
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,9 +16,7 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
|
19
|
-
![上半分がone.html.erbにアクセスした時の表示、下半分がsubmitをクリックしたときの表示](b
|
19
|
+
![上半分がone.html.erbにアクセスした時の表示、下半分がsubmitをクリックしたときの表示](52074f0b57eeb5ac05afe45a4c0b0e42.png)
|
20
|
-
|
21
|
-
|
22
20
|
|
23
21
|
```
|
24
22
|
|