aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/link_to_helper.rb
diff options
context:
space:
mode:
authorDavid Cabo <david@calibea.com>2011-08-17 00:35:50 +0200
committerDavid Cabo <david@calibea.com>2011-08-23 23:45:23 +0200
commitb99b1ec3bc5242084c780082a6c737fb736991a8 (patch)
tree4ee53b1f1bed7430aac1cd6aca3ee9ecde095c4e /app/helpers/link_to_helper.rb
parent04d674b0999299801d9901bfbc0da6e06b3d4938 (diff)
Extend "new public body" form to support multiple locales (closes #142)
Diffstat (limited to 'app/helpers/link_to_helper.rb')
-rwxr-xr-xapp/helpers/link_to_helper.rb2
1 files changed, 1 insertions, 1 deletions
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)