aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/public_body.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index 76fa3555a..d2d50049e 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -336,8 +336,7 @@ class PublicBody < ActiveRecord::Base
# Use tags to describe what type of thing this is
def type_of_authority(html = false)
- first = true
- types = tags.map do |tag|
+ types = tags.each_with_index.map do |tag, index|
if PublicBodyCategory.get().by_tag().include?(tag.name)
desc = PublicBodyCategory.get().singular_by_tag()[tag.name]
@@ -349,6 +348,7 @@ class PublicBody < ActiveRecord::Base
# TODO: this should call proper route helpers, but is in model sigh
desc = '<a href="/body/list/' + tag.name + '">' + desc + '</a>'
end
+
desc
end
end