aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cabo <david@calibea.com>2011-09-06 01:46:36 +0200
committerDavid Cabo <david@calibea.com>2011-09-06 01:46:36 +0200
commitee668aac83b1f5659e5347570b400429217724aa (patch)
treec45023c1dee3c9d8cebf863c1a521a74abd0b221
parent69f5bcf6943e4c369a378e0517614ee39f5c4c26 (diff)
Hide Internal Admin body from the user, fixes #173
-rw-r--r--app/controllers/public_body_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb
index 0e58b7055..bcd7b334c 100644
--- a/app/controllers/public_body_controller.rb
+++ b/app/controllers/public_body_controller.rb
@@ -123,12 +123,13 @@ class PublicBodyController < ApplicationController
@description = @tag
end
end
- PublicBody.with_locale(@locale) do
+ PublicBody.with_locale(@locale) do
@public_bodies = PublicBody.paginate(
:order => "public_body_translations.name", :page => params[:page], :per_page => 1000, # fit all councils on one page
:conditions => conditions,
:joins => :translations
)
+ @public_bodies.delete(PublicBody.internal_admin_body) # Don't show the Internal Admin body to the user
render :template => "public_body/list"
end
end