Salman Lada
2009-Aug-28 07:02 UTC
No route matches "/%20questions/showans/1" with {:method=>:g
Hi i face this problem when i submit the information while evaluating the a new page in a already done scaffold...........the new page is "showans"......i write the link_to tag like this " <%= link_to ''Submit'', :controller => " questions", :action => "showans", :id => @question.id %>" -- Posted via http://www.ruby-forum.com/.
Ghanshyam Rathod
2009-Aug-28 07:08 UTC
Re: No route matches "/%20questions/showans/1" with {:method=>:g
Salman Lada wrote:> Hi > i face this problem when i submit the information while evaluating the a > new page in a already done scaffold...........the new page is > "showans"......i write the link_to tag like this " <%= link_to ''Submit'', > :controller => " questions", :action => "showans", :id => @question.id > %>"Hi Salman, Do not Put space after define controller or action in link_to tag.. Use below <%= link_to ''Submit'', :controller => "questions", :action => "showans", :id => @question.id %>" -- Posted via http://www.ruby-forum.com/.
Colin Law
2009-Aug-28 08:38 UTC
Re: No route matches "/%20questions/showans/1" with {:method=>:g
2009/8/28 Salman Lada <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > Hi > i face this problem when i submit the information while evaluating the a > new page in a already done scaffold...........the new page is > "showans"......i write the link_to tag like this " <%= link_to ''Submit'', > :controller => " questions", :action => "showans", :id => @question.id > %>"I think the space in " questions" is causing the problem. This can be seen in the error as %20 is a space. Colin