diff --git a/README.rdoc b/README.rdoc index a98a7c7..ae913a2 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,6 +1,6 @@ = rails-translate-routes -Rails 3.x routes translations based on Raul's translate_routes (https://github.com/raul/translate_routes). +Rails >=3.1 routes translations based on Raul's translate_routes (https://github.com/raul/translate_routes). It's currently a stripped down version of the forked gem, adding some bugfixes for rails 3.1 and features I needed for my project. See doc below to see what it can do. @@ -193,6 +193,7 @@ Thanks to: * Martin Carel (https://github.com/cawel) * Johan Gyllenspetz (https://github.com/gyllen) * Nico Ritsche (https://github.com/ncri) + * Jean-Loup Fenaux (https://github.com/jlfenaux) * Main development of forked gem: * Raul Murciano (http://github.com/raul) diff --git a/lib/rails-translate-routes.rb b/lib/rails-translate-routes.rb index a8ce082..02cb8b9 100644 --- a/lib/rails-translate-routes.rb +++ b/lib/rails-translate-routes.rb @@ -254,6 +254,7 @@ 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 defaults = route.defaults.merge LOCALE_PARAM_KEY => locale.dup else conditions = { :path_info => translate_path(route.path, locale) }