aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/public_body_controller.rb
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-06-04 12:15:32 +0100
committerGareth Rees <gareth@mysociety.org>2014-06-06 11:09:09 +0100
commit249a1ef17747deadc773b6474df990d803294c44 (patch)
tree7d02b69ca91fa5f6e88d5f925a13538b32ee39b9 /app/controllers/public_body_controller.rb
parentfe3e034cd20cb37d48ef4f3ab2d7c37189000b72 (diff)
Move PublicBody domain logic from controller
Moves the magic 'site_administration' tag logic to the PublicBody model. Easier to make the string passed to `PublicBody#has_tag?` configurable if we want to allow this to be set per install.
Diffstat (limited to 'app/controllers/public_body_controller.rb')
-rw-r--r--app/controllers/public_body_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb
index 9e34396bc..bd019a613 100644
--- a/app/controllers/public_body_controller.rb
+++ b/app/controllers/public_body_controller.rb
@@ -212,8 +212,8 @@ class PublicBodyController < ApplicationController
# Create the CSV
csv = PublicBodyCSV.new
PublicBody.visible.find_each(:include => [:translations, :tags]) do |public_body|
- next if public_body.has_tag?('site_administration')
- csv << public_body
+ next if public_body.site_administration?
+ csv << public_body
end
# Export all the public bodies to that temporary path, make it readable,