summaryrefslogtreecommitdiff
path: root/chef-server-api
diff options
context:
space:
mode:
authorDaniel DeLeo <dan@opscode.com>2011-02-12 11:28:43 -0800
committerDaniel DeLeo <dan@opscode.com>2011-02-12 11:28:43 -0800
commit2655cd13f2924e77fead8c629656a5196b599626 (patch)
tree683728aab2a556639a2d9b6f35e2087152542d72 /chef-server-api
parentd83efaec32a5ffc8c7077b6d4cc3a675ebf1a89b (diff)
downloadchef-2655cd13f2924e77fead8c629656a5196b599626.tar.gz
fix routing to the search indices
Diffstat (limited to 'chef-server-api')
-rw-r--r--chef-server-api/app/controllers/search.rb2
-rw-r--r--chef-server-api/config/router.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/chef-server-api/app/controllers/search.rb b/chef-server-api/app/controllers/search.rb
index 8677b669ef..1131c27034 100644
--- a/chef-server-api/app/controllers/search.rb
+++ b/chef-server-api/app/controllers/search.rb
@@ -27,7 +27,7 @@ class Search < Application
def index
indexes = valid_indexes
- display(indexes.inject({}) { |r,i| r[i] = absolute_url(:search, i); r })
+ display(indexes.inject({}) { |r,i| r[i] = absolute_url(:search_show, i); r })
end
def valid_indexes
diff --git a/chef-server-api/config/router.rb b/chef-server-api/config/router.rb
index b8b4801e3a..8daac5c8c4 100644
--- a/chef-server-api/config/router.rb
+++ b/chef-server-api/config/router.rb
@@ -51,8 +51,9 @@ Merb::Router.prepare do
match("/clients/:id", :id => /[\w\.-]+/, :method=>"delete").to(:controller=>'clients', :action=>'destroy')
# Search
- resources :search
+ #resources :search
match('/search', :method => 'get').to(:controller => 'search', :action => 'index').name(:search)
+ match('/search/:id', :method => 'get').to(:controller => 'search', :action => 'show').name(:search_show)
match('/search/reindex', :method => 'post').to(:controller => "search", :action => "reindex")
# Cookbooks