diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2012-10-17 12:53:32 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2012-10-17 14:47:55 +1100 |
commit | 05f522ecc42e106bffb1945e8e0fd1c25586f73c (patch) | |
tree | b98962500a9a4d5a5945d70a2345d7fcb163e3bc /app/models | |
parent | bb5f18ff9253b82d4402db29e24eb1359818baae (diff) |
Don't include admin authority in count on home page
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/public_body.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index c70aff9b9..c3bc060a4 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -42,6 +42,12 @@ class PublicBody < ActiveRecord::Base has_tag_string before_save :set_api_key, :set_default_publication_scheme + # Every public body except for the internal admin one is visible + named_scope :visible, lambda { + { + :conditions => "public_bodies.id <> #{PublicBody.internal_admin_body.id}" + } + } translates :name, :short_name, :request_email, :url_name, :notes, :first_letter, :publication_scheme |