aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers/link_to_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/link_to_helper.rb')
-rwxr-xr-xapp/helpers/link_to_helper.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 0c0128182..4f749d9d3 100755
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -79,8 +79,12 @@ module LinkToHelper
end
# Public bodies
+ def public_body_url(public_body, options = {})
+ public_body.url_name.nil? ? '' : show_public_body_url(options.merge(:url_name => public_body.url_name))
+ end
+
def public_body_path(public_body)
- public_body.url_name.nil? ? '' : show_public_body_url(:url_name => public_body.url_name, :only_path => true)
+ public_body_url(public_body, :only_path => true)
end
def public_body_link_short(public_body)