Permalink
Browse files

Merge pull request #29 from stephanvane/master

fix for issue #27
  • Loading branch information...
francesc committed Jun 29, 2012
2 parents ae79894 + eabd852 commit ebe5392f8202535204fc7205b73a41410edc872b
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/rails-translate-routes.rb
@@ -274,7 +274,11 @@ def translate_route route, locale
if Rails.version >= '3.2'
conditions = { :path_info => translate_path(route.path.spec.to_s, locale) }
conditions[:request_method] = parse_request_methods route.verb if route.verb != //
- conditions[:subdomain] = route.constraints[:subdomain] if route.constraints
+ if route.constraints
+ route.constraints.each do |k,v|
+ conditions[k] = v unless k == :request_method
+ end
+ end
defaults = route.defaults.merge LOCALE_PARAM_KEY => locale.dup
else
conditions = { :path_info => translate_path(route.path, locale) }

0 comments on commit ebe5392

Please sign in to comment.