aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/link_to_helper.rb
diff options
context:
space:
mode:
authorRobin Houston <robin@lenny.robin>2011-08-25 17:27:59 +0100
committerRobin Houston <robin@lenny.robin>2011-08-25 17:27:59 +0100
commit50cd41b88b4421824e436d9189f8780b84c46a1a (patch)
tree8a2a33222e1f00f88ce102597db7de09fda5b6a0 /app/helpers/link_to_helper.rb
parentbf949a62d7882c9d337e095bebd1e4ba6c4c6767 (diff)
parent87f7fbd076fc301262fc0a628d81b3a1bd3688e7 (diff)
Merge branch 'develop' of git@github.com:sebbacon/alaveteli into develop
Diffstat (limited to 'app/helpers/link_to_helper.rb')
-rwxr-xr-xapp/helpers/link_to_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 444129052..34354a79b 100755
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -61,7 +61,7 @@ module LinkToHelper
# Public bodies
def public_body_url(public_body)
- return show_public_body_url(:url_name => public_body.url_name, :only_path => true)
+ public_body.url_name.nil? ? '' : show_public_body_url(:url_name => public_body.url_name, :only_path => true)
end
def public_body_link_short(public_body)
link_to h(public_body.short_or_long_name), public_body_url(public_body)
@@ -187,7 +187,7 @@ module LinkToHelper
# Basic date format
def simple_date(date)
- return date.strftime("%e %B %Y").strip
+ return I18n.l(date, :format => "%e %B %Y")
end
def simple_time(date)