From 1236567886d4f81cb6d3d4d8017a543c27a66e12 Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 8 Mar 2009 22:47:45 +0100 Subject: enhanced the link_to_path helper and fixed the menu links --- app/helpers/link_helper.rb | 13 ++++++++----- app/views/layouts/application.html.erb | 6 +++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/helpers/link_helper.rb b/app/helpers/link_helper.rb index 68586c1..33d8a06 100644 --- a/app/helpers/link_helper.rb +++ b/app/helpers/link_helper.rb @@ -1,11 +1,14 @@ module LinkHelper - def link_to_path path - url_for( + def link_to_path title, path + params[:locale] ||= I18n.locale + + link_to( + title, :controller => :content, - :action => :render_page, - :language => I18n.locale, - :page_path => path + :action => :render_page, + :locale => params[:locale], + :page_path => path ) end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index be7e044..1446e14 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -25,19 +25,19 @@