質問編集履歴

1

質問に返答する際に、必要と思い追記

2019/12/11 00:14

投稿

kojimahideoooo
kojimahideoooo

スコア7

test CHANGED
File without changes
test CHANGED
@@ -43,3 +43,59 @@
43
43
  <%end%>
44
44
 
45
45
  ```
46
+
47
+
48
+
49
+ ```Rails
50
+
51
+ Rails.application.routes.draw do
52
+
53
+ ActiveAdmin.routes(self)
54
+
55
+ devise_for :users
56
+
57
+ root to: 'page#index'
58
+
59
+ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
60
+
61
+ # APIコントローラへのルーティング
62
+
63
+ namespace :api, {format: 'json'} do
64
+
65
+ namespace :v1 do
66
+
67
+ resources :goals, only: [:index, :show, :create,:update]
68
+
69
+ end
70
+
71
+ end
72
+
73
+ namespace :api, {format: 'json'} do
74
+
75
+ namespace :v1 do
76
+
77
+ resources :employees, only: [:index, :show]
78
+
79
+ end
80
+
81
+ end
82
+
83
+ namespace :api, {format: 'json'} do
84
+
85
+ namespace :v1 do
86
+
87
+ resources :users, only: [:index,:destroy]
88
+
89
+ end
90
+
91
+ end
92
+
93
+
94
+
95
+
96
+
97
+ end
98
+
99
+
100
+
101
+ ```