diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-05-02 13:36:47 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-05-02 13:36:47 +0100 |
commit | 4df02fce0b61faa185f1576359644f1001eddb7d (patch) | |
tree | a4386b8ba5965b4f26360547ffde840ce8b0dd23 | |
parent | ce00cd469a983d32f9f84602c971618baa63444c (diff) |
Ensure we always return a string of some kind when asking for the short_or_long_name of a public body
-rw-r--r-- | app/models/public_body.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index 11c6f6033..2a0661fab 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -240,7 +240,7 @@ class PublicBody < ActiveRecord::Base # Return the short name if present, or else long name def short_or_long_name if self.short_name.nil? || self.short_name.empty? # 'nil' can happen during construction - self.name + self.name.nil? ? "" : self.name else self.short_name end |