I can''t explain where those differences come from. In one Project I can use the link_to without any problems. Like this: <%= link_to "LINKNAME", :action => "destroy", :id => ID %> But in another project... That happens <%= link_to "delete", :action => "destroy", :id => ticket.id %> <%= link_to "edit", :action => "edit", :id => ticket.id %> and that creates a link to -> http://localhost:3000/tickets/2 -> http://localhost:3000/tickets/2/edit What i want is -> http://localhost:3000/tickets/destroy/2 -> http://localhost:3000/tickets/edit/2 Slight but important difference. Can somebody tell me, where I have to configure this? Thanks a lot!!! -- 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 -~----------~----~----~----~------~----~------~--~---
use the :method=> qualifier. On Jul 4, 7:47 pm, Ma Ka <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I can''t explain where those differences come from. > > In one Project I can use the link_to without any problems. > Like this: > <%= link_to "LINKNAME", :action => "destroy", :id => ID %> > > But in another project... That happens > > <%= link_to "delete", :action => "destroy", :id => ticket.id %> > <%= link_to "edit", :action => "edit", :id => ticket.id %> > > and that creates a link to ->http://localhost:3000/tickets/2 > ->http://localhost:3000/tickets/2/edit > > What i want is ->http://localhost:3000/tickets/destroy/2 > ->http://localhost:3000/tickets/edit/2 > > Slight but important difference. > > Can somebody tell me, where I have to configure this? > > Thanks a lot!!! > -- > 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 -~----------~----~----~----~------~----~------~--~---
Mukund wrote:> use the :method=> qualifier.I tried that, but it gives me this: http://localhost:3000/tickets/index/2?method=edit Did I do something wrong? -- 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 -~----------~----~----~----~------~----~------~--~---
Ma Ka wrote:> Mukund wrote: >> use the :method=> qualifier. > > > I tried that, but it gives me this: > http://localhost:3000/tickets/index/2?method=edit > > Did I do something wrong?Dont be worry about that, it is natural link process if you not describe link rule in config/routes.rb, like : map.destroy_tiket '':controller/destroy/:id'', :controller => ''tickets'', :action => ''destroy'' I hope my suggestion can help you. good luck. reinhart http://teapoci.blogspot.com -- 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 -~----------~----~----~----~------~----~------~--~---