diff options
| author | hukl <contact@smyck.org> | 2009-03-08 22:47:45 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-03-08 22:47:45 +0100 |
| commit | 1236567886d4f81cb6d3d4d8017a543c27a66e12 (patch) | |
| tree | 63dde8094551226707a3775d0db14ef4006166dc /app/helpers | |
| parent | 00fe407be045a5b6cf8269965c0fd35a44094741 (diff) | |
enhanced the link_to_path helper and fixed the menu links
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/link_helper.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/app/helpers/link_helper.rb b/app/helpers/link_helper.rb index 68586c10..33d8a060 100644 --- a/app/helpers/link_helper.rb +++ b/app/helpers/link_helper.rb | |||
| @@ -1,11 +1,14 @@ | |||
| 1 | module LinkHelper | 1 | module LinkHelper |
| 2 | 2 | ||
| 3 | def link_to_path path | 3 | def link_to_path title, path |
| 4 | url_for( | 4 | params[:locale] ||= I18n.locale |
| 5 | |||
| 6 | link_to( | ||
| 7 | title, | ||
| 5 | :controller => :content, | 8 | :controller => :content, |
| 6 | :action => :render_page, | 9 | :action => :render_page, |
| 7 | :language => I18n.locale, | 10 | :locale => params[:locale], |
| 8 | :page_path => path | 11 | :page_path => path |
| 9 | ) | 12 | ) |
| 10 | end | 13 | end |
| 11 | 14 | ||
