Skip to content

Commit

Permalink
bugfix: language mapping was not used, instead language code was used…
Browse files Browse the repository at this point in the history
… as path
  • Loading branch information
Steffen Beyer committed Nov 25, 2009
1 parent 221bf12 commit aa860d7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/models/language_redirect_page.rb
Expand Up @@ -46,9 +46,7 @@ def languages
end end


def location def location
path = languages.find do |lang| path = location_map[languages.find { |lang| location_map[lang] }]
location_map[lang]
end
path ||= location_map["*"] || '/en/' path ||= location_map["*"] || '/en/'
path += request.request_uri path += request.request_uri
path.gsub!(%r{([^:])//}, '\1/') path.gsub!(%r{([^:])//}, '\1/')
Expand All @@ -64,4 +62,4 @@ def location_map
@location_map ||= config @location_map ||= config
end end


end end

0 comments on commit aa860d7

Please sign in to comment.