diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/general_controller.rb | 17 | ||||
-rw-r--r-- | app/views/general/_public_body_query.rhtml | 5 | ||||
-rw-r--r-- | app/views/general/frontpage.rhtml (renamed from app/views/general/new_frontpage.rhtml) | 0 |
3 files changed, 2 insertions, 20 deletions
diff --git a/app/controllers/general_controller.rb b/app/controllers/general_controller.rb index 3ef29f149..11a1a61d7 100644 --- a/app/controllers/general_controller.rb +++ b/app/controllers/general_controller.rb @@ -5,12 +5,12 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: general_controller.rb,v 1.41 2008-09-08 02:00:17 francis Exp $ +# $Id: general_controller.rb,v 1.42 2008-09-08 02:05:13 francis Exp $ class GeneralController < ApplicationController # New, improved front page! - def new_frontpage + def frontpage # This is too slow #@popular_bodies = PublicBody.find(:all, :select => "*, (select count(*) from info_requests where info_requests.public_body_id = public_bodies.id) as c", :order => "c desc", :limit => 32) @@ -100,18 +100,5 @@ class GeneralController < ApplicationController render :text => "awake\n" end - private - - # Used in front page search for public body - def public_body_query(query) - # XXX try using search now we have spell correction? - - criteria = '%' + query + '%' - @public_bodies = PublicBody.find(:all, - :conditions => ["lower(name) like lower(?) or lower(short_name) like lower(?)", criteria, criteria], - :order => 'name', :limit=>10) - return @public_bodies - end - end diff --git a/app/views/general/_public_body_query.rhtml b/app/views/general/_public_body_query.rhtml deleted file mode 100644 index 77efdfcc1..000000000 --- a/app/views/general/_public_body_query.rhtml +++ /dev/null @@ -1,5 +0,0 @@ -<ul> -<% for public_body in @public_bodies %> -<li><%=h public_body.name %></li> -<% end %> -</ul> diff --git a/app/views/general/new_frontpage.rhtml b/app/views/general/frontpage.rhtml index 34fed3ee5..34fed3ee5 100644 --- a/app/views/general/new_frontpage.rhtml +++ b/app/views/general/frontpage.rhtml |