Sorry if I am being dumb here but I am trying to route with this url ''/ media/avatars/1/5or6.png'' to the media controller with the avatars action I tried this: map.connect ''media/avatars/:user_id/:filename'', :controller => ''media'', :action => ''avatars'' in my routes.rb file but I''m still getting (No route matches "/media/ avatars/1/5or6.png" with {:method=>:get}) Any pointers would be appreciated --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ok it''s answer my own question time. What I needed was map.connect ''media/avatars/:id/:filename'', :controller => ''media'', :action => ''avatars'', :requirements => { :id => /\d+/, :filename => /\S+\.\S+/ } Works fine now. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---