aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xapp/helpers/link_to_helper.rb8
-rw-r--r--app/views/general/_locale_switcher.rhtml2
2 files changed, 1 insertions, 9 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 030fab20b..42c1e0549 100755
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -269,13 +269,5 @@ module LinkToHelper
def year_from_date(date)
return date.strftime("%Y").strip
end
-
- #I18n locale switcher
-
- def locale_switcher(locale, params)
- params['locale'] = locale
- return url_for(params)
- end
-
end
diff --git a/app/views/general/_locale_switcher.rhtml b/app/views/general/_locale_switcher.rhtml
index 2521b5eb5..d0040bb0d 100644
--- a/app/views/general/_locale_switcher.rhtml
+++ b/app/views/general/_locale_switcher.rhtml
@@ -5,7 +5,7 @@
<% if possible_locale == I18n.locale.to_s %>
<a href="#" class="btn disabled"><%= locale_name(possible_locale) %></a>
<% else %>
- <a href="<%= locale_switcher(possible_locale, params) %>" class="btn"><%= locale_name(possible_locale) %></a>
+ <a href="<%= url_for params.merge(:locale => possible_locale) %>" class="btn"><%= locale_name(possible_locale) %></a>
<% end %>
<% end %>
</div>