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

質問編集履歴

2

ファイルパス記載

2020/09/27 00:44

投稿

sakusaka
sakusaka

スコア14

title CHANGED
File without changes
body CHANGED
@@ -9,19 +9,21 @@
9
9
  もしどなたかお分かりの方いらっしゃいましたら、
10
10
  教えていただければと思います。
11
11
 
12
-
13
- ```app/controllers/test_controller.rb
12
+ app/controllers/test_controller.rb
13
+ ```
14
14
  class TestController < ApplicationController
15
15
  def index
16
16
  end
17
17
  end
18
18
  ```
19
19
 
20
- ```app/views/test/index.html.erb
20
+ app/views/test/index.html.erb
21
+ ```
21
22
  <h1>aaadfsfds</h1>
22
23
  ```
23
24
 
24
- ```config/routes.rb
25
+ config/routes.rb
26
+ ```
25
27
  Rails.application.routes.draw do
26
28
  # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
27
29
  resources :test

1

ソースコード追記

2020/09/27 00:44

投稿

sakusaka
sakusaka

スコア14

title CHANGED
File without changes
body CHANGED
@@ -9,6 +9,28 @@
9
9
  もしどなたかお分かりの方いらっしゃいましたら、
10
10
  教えていただければと思います。
11
11
 
12
+
13
+ ```app/controllers/test_controller.rb
14
+ class TestController < ApplicationController
15
+ def index
16
+ end
17
+ end
18
+ ```
19
+
20
+ ```app/views/test/index.html.erb
21
+ <h1>aaadfsfds</h1>
22
+ ```
23
+
24
+ ```config/routes.rb
25
+ Rails.application.routes.draw do
26
+ # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
27
+ resources :test
28
+ get "test/index"
29
+ post "test/index"
30
+ resources :api
31
+ end
32
+ ```
33
+
12
34
  ソースは、下記になります。
13
35
  https://github.com/sakusaka/docker-rails-mysql/tree/t-ogasawara/docker-compose-create
14
36