From 0d8879354fbd251e4509a0ab5c6b6e47aa3fa47d Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 19 Jul 2009 18:40:07 +0200 Subject: fixed link_for_path issue --- app/helpers/link_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/helpers') diff --git a/app/helpers/link_helper.rb b/app/helpers/link_helper.rb index 3be5953..b40aa4b 100644 --- a/app/helpers/link_helper.rb +++ b/app/helpers/link_helper.rb @@ -1,7 +1,9 @@ module LinkHelper def link_to_path title, path, html_options = {} - active = (params[:page_path].join("/") == path.sub(/^\//, "")) + if params[:page_path] + active = (params[:page_path].join("/") == path.sub(/^\//, "")) + end params[:locale] ||= I18n.locale -- cgit v1.3