Ruby on Rails. Unicode routes -


Is it possible to set Unicode string as a segment of path in the rail?

I will try the following:

  # app / controller / magazine_controller RB Class Magazines Controller  
  # Encoding: UTF-8 # Config / routes.rb PublishingHouse :: application.routes.draw Do resources: Magazines, Only =>: Index ,: Path =>: Jungle = # Unicode string is set as a segment of path term  
$ Rake Route Magazines / Receive (.: Format) {: verb => "index" ,: controller => "magazines"}

But when Routing error:

 $ w3m http: // localhost: 3000 / журналы ... routing error does not match any route "/% D0% B6% D1% 83% D1% Here is the server G: 

 $ rails s thin ... for "% / 80% D0% BD% D0% B0% D0% BB% D1% 8B" 

D0% B6% D1% 83% D1% 80% D0% BD% D0% B0% D0% BB% D1% 8B "Start at 127.0.0.1 2010-09-26 13:35:00 +0400 Action Controller :: Routing error (no route matching "/% D0% B6% D1% 83% D1% 80% D 0% BD% D 0% B 0% d 0% BB% D1% 8B"): Rated / URSR / Local / Lib / RUB / Games / 19 1 / Games / ActivitiesPak-3.0.0 / Lib / Process Dispatch / Milfware / Templates / Paints / Routing_Amerge RB saves / layout (1.2 ms)

thanks.

Debian GNU / Linux 5.0.6;

Ruby 1.9.2;

Ruby 3.0 on Ruby 3.0

Intrint, I think the rail needs a patch for it. I will talk about it with someone from the original later. In the meantime, the following should work:

  PublishingHouse :: Application.routes.draw do resources: magazines, only => : Index, path = & gt; Rack :: Util. Escape ('jungle') #unicode string is set to be a segment of path end  

Comments