Skip to content

Commit

Permalink
exclude wymiframe from the routing filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Jun 29, 2010
1 parent 77534f9 commit 9162260
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vendor/plugins/i18n/lib/i18n_filter.rb
Expand Up @@ -4,7 +4,7 @@ class Locale < Base
def around_recognize(path, env, &block)
if Refinery::I18n.enabled?
locale = nil
path.sub! %r(^/(([a-zA-Z\-_])*)(?=/|$)) do locale = $1; '' end if path !~ %r{^/refinery}
path.sub! %r(^/(([a-zA-Z\-_])*)(?=/|$)) do locale = $1; '' end if path !~ %r{^/(refinery|wymiframe)}

returning yield do |params|
params[:locale] = (locale.presence || Refinery::I18n.current_locale)
Expand All @@ -18,7 +18,7 @@ def around_generate(*args, &block)
if Refinery::I18n.enabled?
locale = args.extract_options!.delete(:locale) || Refinery::I18n.current_locale
returning yield do |result|
result.sub!(%r(^(http.?://[^/]*)?(.*))){ "#{$1}/#{locale}#{$2}" } if result !~ %r{^/refinery}
result.sub!(%r(^(http.?://[^/]*)?(.*))){ "#{$1}/#{locale}#{$2}" } if result !~ %r{^/(refinery|wymiframe)}
result
end
else
Expand Down

0 comments on commit 9162260

Please sign in to comment.