forked from bofh/fetsite
GitHub Account angelegt
This commit is contained in:
10
app/helpers/application_helper.rb
Normal file
10
app/helpers/application_helper.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
module ApplicationHelper
|
||||
def current_url(overwrite={})
|
||||
url_for :only_path => true, :params => params.merge(overwrite).except(:controller,:action)
|
||||
end
|
||||
def switch_locale_url(target_locale)
|
||||
current_url({:locale=>target_locale}) .sub "/"+I18n.locale.to_s+"/", "/"+target_locale.to_s+"/"
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user