diff options
| author | hukl <contact@smyck.org> | 2009-02-20 11:09:27 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-02-20 11:09:27 +0100 |
| commit | ce3b464e48648f5f896300cf980dad000fb8094b (patch) | |
| tree | dbe6e64e993f5679cdab5966c4c05e824a2c80e3 /vendor/plugins | |
| parent | cb2e86095e8c604eceda0f5e1f62910a05a6efcb (diff) | |
another modification for the routing filter
Diffstat (limited to 'vendor/plugins')
| -rw-r--r-- | vendor/plugins/routing-filter/lib/routing_filter/locale.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vendor/plugins/routing-filter/lib/routing_filter/locale.rb b/vendor/plugins/routing-filter/lib/routing_filter/locale.rb index 0aa6adc..6fc3e11 100644 --- a/vendor/plugins/routing-filter/lib/routing_filter/locale.rb +++ b/vendor/plugins/routing-filter/lib/routing_filter/locale.rb | |||
| @@ -26,9 +26,8 @@ module RoutingFilter | |||
| 26 | locale = args.extract_options!.delete(:locale) || I18n.locale | 26 | locale = args.extract_options!.delete(:locale) || I18n.locale |
| 27 | returning yield do |result| | 27 | returning yield do |result| |
| 28 | if locale.to_sym != @@default_locale | 28 | if locale.to_sym != @@default_locale |
| 29 | if result.respond_to?(:sub) | 29 | target = result.is_a?(Array) ? result.first : result |
| 30 | result.sub!(%r(^(http.?://[^/]*)?(.*))){ "#{$1}/#{locale}#{$2}" } | 30 | target.sub!(%r(^(http.?://[^/]*)?(.*))){ "#{$1}/#{locale}#{$2}" } |
| 31 | end | ||
| 32 | end | 31 | end |
| 33 | end | 32 | end |
| 34 | end | 33 | end |
