summaryrefslogtreecommitdiff
path: root/vendor/plugins
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-02-20 09:10:57 +0100
committerhukl <contact@smyck.org>2009-02-20 09:10:57 +0100
commitd579a7ce703773f236a1b7d7f0828a45427b5787 (patch)
treed2feaadf606946d07a353f8772e2c8b37be96319 /vendor/plugins
parentf2fadda259d17046d55b0144fba4b44748ff4a93 (diff)
fix for routing filter and helpers, need to talk
to svenfuchs about that ;) hardcoded default_locale within the plugin and not considering globbed routes as it seems
Diffstat (limited to 'vendor/plugins')
-rw-r--r--vendor/plugins/routing-filter/lib/routing_filter/locale.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/plugins/routing-filter/lib/routing_filter/locale.rb b/vendor/plugins/routing-filter/lib/routing_filter/locale.rb
index b7fcc31..0aa6adc 100644
--- a/vendor/plugins/routing-filter/lib/routing_filter/locale.rb
+++ b/vendor/plugins/routing-filter/lib/routing_filter/locale.rb
@@ -3,7 +3,7 @@ require 'routing_filter/base'
3 3
4module RoutingFilter 4module RoutingFilter
5 class Locale < Base 5 class Locale < Base
6 @@default_locale = :en 6 @@default_locale = :he
7 cattr_reader :default_locale 7 cattr_reader :default_locale
8 8
9 class << self 9 class << self
@@ -26,7 +26,9 @@ 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 result.sub!(%r(^(http.?://[^/]*)?(.*))){ "#{$1}/#{locale}#{$2}" } 29 if result.respond_to?(:sub)
30 result.sub!(%r(^(http.?://[^/]*)?(.*))){ "#{$1}/#{locale}#{$2}" }
31 end
30 end 32 end
31 end 33 end
32 end 34 end