diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-06-04 12:15:32 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-06-06 11:09:09 +0100 |
commit | 249a1ef17747deadc773b6474df990d803294c44 (patch) | |
tree | 7d02b69ca91fa5f6e88d5f925a13538b32ee39b9 /app/models | |
parent | fe3e034cd20cb37d48ef4f3ab2d7c37189000b72 (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/models')
-rw-r--r-- | app/models/public_body.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index d0e5bbb9e..20644a4da 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -399,6 +399,9 @@ class PublicBody < ActiveRecord::Base end end + def site_administration? + has_tag?('site_administration') + end class ImportCSVDryRun < StandardError end |