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

質問編集履歴

4

追記

2017/03/07 04:49

投稿

pecchan
pecchan

スコア592

title CHANGED
File without changes
body CHANGED
@@ -39,4 +39,9 @@
39
39
  viewは2つ(index.html.erb、show.html.erb)置いています。
40
40
 
41
41
  indexを実行させたいのですが・・・・
42
- 何が原因でしょうか?
42
+ 何が原因でしょうか?
43
+
44
+
45
+ 【追記】
46
+ hogehoge/ だけだとindexが呼ばれます。
47
+ hogehoge/index だとshowが呼ばれました。

3

a

2017/03/07 04:49

投稿

pecchan
pecchan

スコア592

title CHANGED
File without changes
body CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  ```ruby
16
16
  # coding: utf-8
17
- class SectionsController < ApplicationController
17
+ class HogehogesController < ApplicationController
18
18
 
19
19
  #一覧
20
20
  def index

2

a

2017/03/07 04:28

投稿

pecchan
pecchan

スコア592

title CHANGED
File without changes
body CHANGED
@@ -36,6 +36,7 @@
36
36
 
37
37
  ```
38
38
 
39
+ viewは2つ(index.html.erb、show.html.erb)置いています。
39
40
 
40
41
  indexを実行させたいのですが・・・・
41
42
  何が原因でしょうか?

1

a

2017/03/07 04:26

投稿

pecchan
pecchan

スコア592

title CHANGED
File without changes
body CHANGED
@@ -18,11 +18,11 @@
18
18
 
19
19
  #一覧
20
20
  def index
21
- @msg= Section.order("indexだよ")
21
+ @msg= "indexだよ"
22
22
  end
23
23
 
24
24
  def show
25
- @msg= Section.order("showだよ")
25
+ @msg= "showだよ"
26
26
  end
27
27
 
28
28
  def new