From 82d8827d64441a808c856ff91d648953de837002 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Mon, 22 Aug 2011 20:06:34 +0100 Subject: Use rails localisation function to return date. Fixes #152. --- app/helpers/link_to_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/helpers/link_to_helper.rb') diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb index 444129052..445a96920 100755 --- a/app/helpers/link_to_helper.rb +++ b/app/helpers/link_to_helper.rb @@ -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) -- cgit v1.2.3 From b99b1ec3bc5242084c780082a6c737fb736991a8 Mon Sep 17 00:00:00 2001 From: David Cabo Date: Wed, 17 Aug 2011 00:35:50 +0200 Subject: Extend "new public body" form to support multiple locales (closes #142) --- app/helpers/link_to_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/helpers/link_to_helper.rb') diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb index 445a96920..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) -- cgit v1.2.3