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

質問編集履歴

1

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

2019/12/11 00:14

投稿

kojimahideoooo
kojimahideoooo

スコア7

title CHANGED
File without changes
body CHANGED
@@ -20,4 +20,32 @@
20
20
  <%else%>
21
21
  <div></div>
22
22
  <%end%>
23
+ ```
24
+
25
+ ```Rails
26
+ Rails.application.routes.draw do
27
+ ActiveAdmin.routes(self)
28
+ devise_for :users
29
+ root to: 'page#index'
30
+ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
31
+ # APIコントローラへのルーティング
32
+ namespace :api, {format: 'json'} do
33
+ namespace :v1 do
34
+ resources :goals, only: [:index, :show, :create,:update]
35
+ end
36
+ end
37
+ namespace :api, {format: 'json'} do
38
+ namespace :v1 do
39
+ resources :employees, only: [:index, :show]
40
+ end
41
+ end
42
+ namespace :api, {format: 'json'} do
43
+ namespace :v1 do
44
+ resources :users, only: [:index,:destroy]
45
+ end
46
+ end
47
+
48
+
49
+ end
50
+
23
51
  ```