Skip to content

Commit

Permalink
now also handling globbed routes as expected
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Fuchs <svenfuchs@artweb-design.de>
  • Loading branch information
hukl authored and Sven Fuchs committed Apr 1, 2009
1 parent 4d06e66 commit e46122e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/routing_filter/locale.rb
Expand Up @@ -26,8 +26,9 @@ def around_generate(*args, &block)
locale = args.extract_options!.delete(:locale) || I18n.locale
returning yield do |result|
if locale.to_sym != @@default_locale
result.sub!(%r(^(http.?://[^/]*)?(.*))){ "#{$1}/#{locale}#{$2}" }
end
target = result.is_a?(Array) ? result.first : result
target.sub!(%r(^(http.?://[^/]*)?(.*))){ "#{$1}/#{locale}#{$2}" }
< end
end
end
end
Expand Down

0 comments on commit e46122e

Please sign in to comment.