I''m trying to go to localhost/phrases/new where ''phrases'' is my controller and ''new'' is my action which will simply show my new.html.erb In my routes i have: map.connect ''/:controller/:action'' Yet every time i go to phrases/new, I get redirected to my show action http://pastie.org/356249 I can get around this if i use: map.connect ''/:controller/:action.'' But i find it distasteful to have that period at the end of my URL. Any clue why everything gets redirected to :action => ''show'' -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Richard, Why not just lose this line from your routes file: map.connect ''/:controller/:action'' Since map.resources came along, I always delete the default stuff that comes in the routes file. See if /phrases/new works the way it should after removing that line. -- Josh http://iammrjoshua.com Richard Schneeman wrote:> I''m trying to go to localhost/phrases/new > > where ''phrases'' is my controller and ''new'' is my action which will > simply show my new.html.erb > > In my routes i have: > map.connect ''/:controller/:action'' > > Yet every time i go to phrases/new, I get redirected to my show action > > http://pastie.org/356249 > > I can get around this if i use: > map.connect ''/:controller/:action.'' > > But i find it distasteful to have that period at the end of my URL. Any > clue why everything gets redirected to :action => ''show''-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Try what was recommended and what does your controller look like? On Jan 8, 10:29 pm, Joshua Abbott <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Richard, > > Why not just lose this line from your routes file: > > map.connect ''/:controller/:action'' > > Since map.resources came along, I always delete the default stuff that > comes in the routes file. See if /phrases/new works the way it should > after removing that line. > > -- Joshhttp://iammrjoshua.com > > > > Richard Schneeman wrote: > > I''m trying to go to localhost/phrases/new > > > where ''phrases'' is my controller and ''new'' is my action which will > > simply show my new.html.erb > > > In my routes i have: > > map.connect ''/:controller/:action'' > > > Yet every time i go to phrases/new, I get redirected to my show action > > >http://pastie.org/356249 > > > I can get around this if i use: > > map.connect ''/:controller/:action.'' > > > But i find it distasteful to have that period at the end of my URL. Any > > clue why everything gets redirected to :action => ''show'' > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---