Skip to content

Commit

Permalink
[webui] remove first webui/ controller in the API
Browse files Browse the repository at this point in the history
It's just one AR call now
  • Loading branch information
coolo committed Oct 22, 2013
1 parent 690ab15 commit 1c50011
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
6 changes: 0 additions & 6 deletions src/api/app/controllers/webui/attrib_types_controller.rb

This file was deleted.

1 change: 0 additions & 1 deletion src/api/config/routes.rb
Expand Up @@ -369,7 +369,6 @@
end
resources :owners, :only => [:index]
resources :searches, :only => [:new, :create]
resources :attrib_types, :only => [:index]

# comments
get 'comments/request/:id/' => 'comments#requests', constraints: cons
Expand Down
5 changes: 2 additions & 3 deletions src/api/webui/app/controllers/webui/search_controller.rb
Expand Up @@ -182,9 +182,8 @@ def set_parameters
end

def set_attribute_list
# FIXME: needs caching?
@attrib_type_list = Webui::ApiDetails.read(:attrib_types).map do |t|
["#{t['attrib_namespace_name']}:#{t['name']}", t['id']]
@attrib_type_list = AttribType.includes(:attrib_namespace).map do |t|
["#{t.attrib_namespace.name}:#{t.name}", t['id']]
end
@attrib_type_list.sort_by! {|a| a.first }
@attrib_type_list.unshift(['', ''])
Expand Down
2 changes: 0 additions & 2 deletions src/api/webui/app/models/webui/api_details.rb
Expand Up @@ -79,8 +79,6 @@ def self.http_do(verb, route_name, *args)
when :ids_requests then "requests/ids"
when :by_class_requests then "requests/by_class"

when :attrib_types then "attrib_types"

when :searches then "searches"

when :comments_by_package then "comments/package/#{ids.first}/#{ids.last}"
Expand Down

0 comments on commit 1c50011

Please sign in to comment.