Hi! I just realized that edge ruby (1.2.2) breaks my routes. :id does not include periods (".") any more, in favour of allowing :id.:format. How can I create the old behevior, i.e. a route, so that "/controller/ action/abc.jpg" returns "abc.jpg" in a single argument (:id)? "/:controller/:action/:id" does not work as expected and returns :id "abc". Thanks Martin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Martin Aus Chemnitz wrote:> I just realized that edge ruby (1.2.2) breaks my routes. :id does not > include periods (".") any more, in favour of allowing :id.:format. > > How can I create the old behevior, i.e. a route, so that "/controller/ > action/abc.jpg" returns "abc.jpg" in a single argument (:id)? > "/:controller/:action/:id" does not work as expected and returns :id > "abc".I''m sure there''s a more Ruby-like way of doing this but I just modified the source code directly. In rails/actionpack/lib/action_controller/routing.rb you''ll see this: module Routing SEPARATORS = %w( / ; . , ? ) Just take out the "." -- Michael Wang --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Martin Aus Chemnitz wrote:> Hi! > > I just realized that edge ruby (1.2.2) breaks my routes. :id does not > include periods (".") any more, in favour of allowing :id.:format. > > How can I create the old behevior, i.e. a route, so that "/controller/ > action/abc.jpg" returns "abc.jpg" in a single argument (:id)? > "/:controller/:action/:id" does not work as expected and returns :id > "abc".map.load_post_image ''news/load_image/:id/:file_name'', :controller => ''news'', :action => ''load_image'', :requirements => { :file_name => /.*/ } Cheers, Jonathan -- Jonathan Weiss http://blog.innerewut.de --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---