diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-03-05 13:41:50 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-03-05 13:41:50 +0000 |
commit | 7bc05735fd6b138d09e92be08979c86525b1b0bd (patch) | |
tree | 3317d7ae235673b322eacd3d75642f5daa62791f /app/models | |
parent | 13408b4569f8c164e275cb594920813ec8210aec (diff) | |
parent | 0947b1445ce4e6ac73e2a7a1536ab4aac775f6a6 (diff) |
Merge branch '59-localised-authority-links' into rails-3-develop
Conflicts:
app/views/public_body/show.html.erb
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/public_body.rb | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index c023b436c..0e90a3c16 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -345,35 +345,6 @@ class PublicBody < ActiveRecord::Base end end - - # Use tags to describe what type of thing this is - def type_of_authority(html = false) - 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] - - if index.zero? - desc = desc.sub(/\S/) { |m| Unicode.upcase(m) } - end - - if html - # 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 - - types.compact! - - if types.any? - types.to_sentence(:last_word_connector => ' and ').html_safe - else - _("A public authority") - end - end - # Guess home page from the request email, or use explicit override, or nil # if not known. def calculated_home_page |