Skip to content

Commit 7989478

Browse files
committed
fixed routing to properly use the /knowledgebase scope within a project
1 parent bea1727 commit 7989478

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

config/routes.rb

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
RedmineApp::Application.routes.draw do
2-
3-
resources :projects do
4-
5-
match '/knowledgebase', :to => 'knowledgebase#index', :via => :get
6-
2+
scope "/projects/:project_id/knowledgebase" do
3+
get '/' => 'knowledgebase#index'
74
resources :categories, :via => [:get, :post]
85
resources :articles do
9-
collection do
10-
get "tagged"
11-
post "preview"
12-
end
13-
get "comment"
14-
member do
15-
put "preview"
16-
post "add_comment"
17-
post "destroy_comment"
18-
post "rate"
19-
end
20-
end
6+
collection do
7+
get "tagged"
8+
post "preview"
9+
end
10+
11+
get "comment"
12+
13+
member do
14+
put "preview"
15+
post "add_comment"
16+
post "destroy_comment"
17+
post "rate"
18+
end
19+
end
2120
end
2221
end

0 commit comments

Comments
 (0)