質問編集履歴
2
ファイルパス記載
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,9 +20,9 @@
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
+
app/controllers/test_controller.rb
|
23
24
|
|
24
|
-
|
25
|
-
```
|
25
|
+
```
|
26
26
|
|
27
27
|
class TestController < ApplicationController
|
28
28
|
|
@@ -36,7 +36,9 @@
|
|
36
36
|
|
37
37
|
|
38
38
|
|
39
|
-
|
39
|
+
app/views/test/index.html.erb
|
40
|
+
|
41
|
+
```
|
40
42
|
|
41
43
|
<h1>aaadfsfds</h1>
|
42
44
|
|
@@ -44,7 +46,9 @@
|
|
44
46
|
|
45
47
|
|
46
48
|
|
47
|
-
|
49
|
+
config/routes.rb
|
50
|
+
|
51
|
+
```
|
48
52
|
|
49
53
|
Rails.application.routes.draw do
|
50
54
|
|
1
ソースコード追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,6 +20,50 @@
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
+
|
24
|
+
|
25
|
+
```app/controllers/test_controller.rb
|
26
|
+
|
27
|
+
class TestController < ApplicationController
|
28
|
+
|
29
|
+
def index
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
```
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
```app/views/test/index.html.erb
|
40
|
+
|
41
|
+
<h1>aaadfsfds</h1>
|
42
|
+
|
43
|
+
```
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
```config/routes.rb
|
48
|
+
|
49
|
+
Rails.application.routes.draw do
|
50
|
+
|
51
|
+
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
|
52
|
+
|
53
|
+
resources :test
|
54
|
+
|
55
|
+
get "test/index"
|
56
|
+
|
57
|
+
post "test/index"
|
58
|
+
|
59
|
+
resources :api
|
60
|
+
|
61
|
+
end
|
62
|
+
|
63
|
+
```
|
64
|
+
|
65
|
+
|
66
|
+
|
23
67
|
ソースは、下記になります。
|
24
68
|
|
25
69
|
https://github.com/sakusaka/docker-rails-mysql/tree/t-ogasawara/docker-compose-create
|