aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2015-05-06 12:30:24 +0100
committerGareth Rees <gareth@mysociety.org>2015-05-07 13:25:16 +0100
commitb624c4735c325bbc1c062d8e6c9aa89a5b7fcf19 (patch)
tree3ad2d65b49d18b422041afa0da89b16b142a9350
parent47fcd7ea7c9065e2727f1954be8bbffcf17e4114 (diff)
Minor tidy up
Remove explicit returns Remove self Ternary for short conditional Moved #site_administration? to be nearer similar methods
-rw-r--r--app/models/public_body.rb19
1 files changed, 8 insertions, 11 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index 5bce8ecc7..dac77d4c5 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -339,19 +339,20 @@ class PublicBody < ActiveRecord::Base
# Are all requests to this body under the Environmental Information Regulations?
def eir_only?
- return self.has_tag?('eir_only')
+ has_tag?('eir_only')
end
+
def law_only_short
- if self.eir_only?
- return "EIR"
- else
- return "FOI"
- end
+ eir_only? ? 'EIR' : 'FOI'
end
# Schools are allowed more time in holidays, so we change some wordings
def is_school?
- return self.has_tag?('school')
+ has_tag?('school')
+ end
+
+ def site_administration?
+ has_tag?('site_administration')
end
# The "internal admin" is a special body for internal use.
@@ -379,10 +380,6 @@ class PublicBody < ActiveRecord::Base
end
end
- def site_administration?
- has_tag?('site_administration')
- end
-
class ImportCSVDryRun < StandardError
end