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

質問編集履歴

7

タグ

2021/04/15 11:09

投稿

kato2
kato2

スコア1

title CHANGED
File without changes
body CHANGED
File without changes

6

書式

2021/04/15 11:09

投稿

kato2
kato2

スコア1

title CHANGED
File without changes
body CHANGED
@@ -1,12 +1,16 @@
1
1
  ### 前提・実現したいこと
2
-
3
2
  ```
4
- 目的、 one.html.erbというviewのsubmitをクリックすると、同じhomeコントロール上のresultアクションに対応したresult.html.erbを表示させたい
3
+ one.html.erbというviewの「計算する」というボタンをクリックすると、同じhomeコントロール上のresultアクションに対応したresult.html.erbを表示させたい
4
+ ```
5
+ ![one.html.erb](58e9557d5cd2fb52169d74df573d4200.png)
6
+ ###現状
7
+ ```
5
- 現状、submitをクリックしても画面が変わらないが、ターミナル上では 
8
+ 「計算する」というボタンをクリックしても画面が変わらないが、ターミナル上では 
6
9
  Rendering home/result.html.erb within layouts/application
7
10
  Rendered home/result.html.erb within layouts/application(Duration: 0.1ms | Allocations: 4)
8
11
  と表示されている。
9
12
  ```
13
+
10
14
  ###ターミナル
11
15
  ```
12
16
  [上半分がone.html.erbにアクセスした時の表示、下半分がsubmitをクリックしたときの表示]

5

書式

2021/04/15 06:58

投稿

kato2
kato2

スコア1

title CHANGED
@@ -1,1 +1,1 @@
1
- コントローラー上でのrenderが効果がなく、指定したactionview表示されない
1
+ 【Rails】コントローラー上でのrender移動できない
body CHANGED
File without changes

4

誤字

2021/04/15 06:50

投稿

kato2
kato2

スコア1

title CHANGED
File without changes
body CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ```
4
4
  目的、 one.html.erbというviewのsubmitをクリックすると、同じhomeコントロール上のresultアクションに対応したresult.html.erbを表示させたい
5
- 現状、submitをクリックしても画面が変わらないが、ターミナル上では
5
+ 現状、submitをクリックしても画面が変わらないが、ターミナル上では 
6
6
  Rendering home/result.html.erb within layouts/application
7
7
  Rendered home/result.html.erb within layouts/application(Duration: 0.1ms | Allocations: 4)
8
8
  と表示されている。

3

誤字

2021/04/15 02:49

投稿

kato2
kato2

スコア1

title CHANGED
File without changes
body CHANGED
@@ -31,7 +31,7 @@
31
31
 
32
32
  ###現状コード
33
33
  1, one.html.erb
34
- ```html.erb
34
+ ```html.erb   
35
35
  <h1>入力</h1>
36
36
  <%# form_with →post(redirect) →get%>
37
37
  <%= form_with url: {controller:'home', action:'count', local: true} do |form| %>

2

書式

2021/04/14 11:59

投稿

kato2
kato2

スコア1

title CHANGED
File without changes
body CHANGED
@@ -6,9 +6,29 @@
6
6
  Rendering home/result.html.erb within layouts/application
7
7
  Rendered home/result.html.erb within layouts/application(Duration: 0.1ms | Allocations: 4)
8
8
  と表示されている。
9
+ ```
10
+ ###ターミナル
11
+ ```
12
+ [上半分がone.html.erbにアクセスした時の表示、下半分がsubmitをクリックしたときの表示]
9
13
 
14
+ Started POST "/count?local=true" for ::1 at 2021-04-14 12:09:08 +0900
15
+ Processing by HomeController#count as JS
16
+ Parameters: {"authenticity_token"=>"SqQs5wSdOqTSUOWNPoCHHt2Leof+xODA039AEPruoVVd9cVZENpkw5AFU4mbM1xnqFdv4Zqo2jsvxm9P1+UNXA==", "p1"=>"3", "commit"=>"計算する", "local"=>"true"}
17
+ Rendering home/result.html.erb within layouts/application
10
- ![上半分がone.html.erbにアクセスした時の表示、下半分がsubmitをクリックしたときの表示](52074f0b57eeb5ac05afe45a4c0b0e42.png)
18
+ Rendered home/result.html.erb within layouts/application (Duration: 0.0ms | Allocations: 4)
19
+ [Webpacker] Everything's up-to-date. Nothing to do
20
+ Completed 200 OK in 11ms (Views: 9.6ms | ActiveRecord: 0.0ms | Allocations: 4111)
21
+
22
+
23
+ Started POST "/count?local=true" for ::1 at 2021-04-14 12:09:09 +0900
24
+ Processing by HomeController#count as JS
25
+ Parameters: {"authenticity_token"=>"SqQs5wSdOqTSUOWNPoCHHt2Leof+xODA039AEPruoVVd9cVZENpkw5AFU4mbM1xnqFdv4Zqo2jsvxm9P1+UNXA==", "p1"=>"3", "commit"=>"計算する", "local"=>"true"}
26
+ Rendering home/result.html.erb within layouts/application
27
+ Rendered home/result.html.erb within layouts/application (Duration: 0.2ms | Allocations: 4)
28
+ [Webpacker] Everything's up-to-date. Nothing to do
29
+ Completed 200 OK in 11ms (Views: 9.3ms | ActiveRecord: 0.0ms | Allocations: 4113)
11
30
  ```
31
+
12
32
  ###現状コード
13
33
  1, one.html.erb
14
34
  ```html.erb

1

画像

2021/04/14 03:28

投稿

kato2
kato2

スコア1

title CHANGED
File without changes
body CHANGED
@@ -7,8 +7,7 @@
7
7
  Rendered home/result.html.erb within layouts/application(Duration: 0.1ms | Allocations: 4)
8
8
  と表示されている。
9
9
 
10
- ![上半分がone.html.erbにアクセスした時の表示、下半分がsubmitをクリックしたときの表示](bfc19e0a4b2a41b9431a6d6a2e04d258.png)
10
+ ![上半分がone.html.erbにアクセスした時の表示、下半分がsubmitをクリックしたときの表示](52074f0b57eeb5ac05afe45a4c0b0e42.png)
11
-
12
11
  ```
13
12
  ###現状コード
14
13
  1, one.html.erb