muck-engine 0.1.27 → 0.1.28
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/helpers/muck_engine_helper.rb +7 -1
- data/muck-engine.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.28
|
@@ -82,7 +82,13 @@ module MuckEngineHelper
|
|
82
82
|
def locale_link(name, locale)
|
83
83
|
#link_to name, request.protocol + locale + '.' + request.domain + request.request_uri
|
84
84
|
#link_to name, request.url.gsub(request.protocol, "#{request.protocol}#{locale}.")
|
85
|
-
link_to name, request.url.sub(request.protocol, "#{request.protocol}#{locale}.").sub('www.','')
|
85
|
+
#link_to name, request.url.sub(request.protocol, "#{request.protocol}#{locale}.").sub('www.','')
|
86
|
+
if request.domain.count('.') == 1
|
87
|
+
new_domain = request.url.sub(protocol, "#{protocol}#{locale}.")
|
88
|
+
else
|
89
|
+
new_domain = request.url.sub(Regexp.new(protocol + "[^\.]+."), "#{protocol}#{locale}.")
|
90
|
+
end
|
91
|
+
link_to name, new_domain
|
86
92
|
end
|
87
93
|
|
88
94
|
# Generate parameters for a url that refer to a given object as parent. Useful
|
data/muck-engine.gemspec
CHANGED