diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-04-07 12:58:54 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-04-07 12:58:54 +0100 |
commit | 06e13489e2afa36f2070f61fd68abb357c1d18b7 (patch) | |
tree | 454b66a828144f616e3675f553c7a0f396b8697e /app/helpers | |
parent | d2fd05bb203466187ec87479f78792f3e047ff45 (diff) | |
parent | cd0823a4bae3e98301e2eeea50c6d0f5c9c8e83d (diff) |
Merge branch 'master' into rails-3-develop
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/public_body_helper.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/helpers/public_body_helper.rb b/app/helpers/public_body_helper.rb index 332e93284..57c90a9ba 100644 --- a/app/helpers/public_body_helper.rb +++ b/app/helpers/public_body_helper.rb @@ -38,12 +38,13 @@ module PublicBodyHelper # # Returns a string def type_of_authority(public_body) - types = public_body.tags.each_with_index.map do |tag, index| + first = true + types = public_body.tags.each.map do |tag| if PublicBodyCategory.get().by_tag().include?(tag.name) desc = PublicBodyCategory.get().singular_by_tag()[tag.name] - - if index.zero? + if first desc = desc.sub(/\S/) { |m| Unicode.upcase(m) } + first = false end link_to(desc, list_public_bodies_path(tag.name)) end |