Hi- I encountered a problem I have never seen before. For some reason, requests for Destroy are routing to Edit. Here''s the route: DELETE /instructions/:id(.:format) {:action=>"destroy", :controller=>"instructions"} Here''s the call to render it: <%= link_to ''Delete'', instruction, :confirm => ''Are you sure?'', :method => :delete %> This is all from the scaffolding created by Rails. Whenever that link is clicked, it routes the user to the Edit page. If I look at the logs, it looks like a GET request is made instead of a Delete. Has anyone seen this before? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
are you using rails 3? this problem usually occur if you remove the javascripts to be used to handle the :confirm argument and the csrf meta tag. On Fri, Feb 11, 2011 at 11:46 PM, pete <peterbattaglia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi- > > I encountered a problem I have never seen before. For some reason, > requests for Destroy are routing to Edit. > > Here''s the route: > DELETE /instructions/:id(.:format) > {:action=>"destroy", :controller=>"instructions"} > > Here''s the call to render it: > <%= link_to ''Delete'', instruction, :confirm => ''Are you > sure?'', :method => :delete %> > > This is all from the scaffolding created by Rails. Whenever that link > is clicked, it routes the user to the Edit page. > > If I look at the logs, it looks like a GET request is made instead of > a Delete. > > Has anyone seen this before? > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Yes, and I did remove the CSRF meta tag. Thanks, I''ll look into it! On Feb 11, 8:58 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> are you using rails 3? this problem usually occur if you remove the > javascripts to be used to handle the :confirm argument and the csrf meta > tag. > > > > > > > > > > On Fri, Feb 11, 2011 at 11:46 PM, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi- > > > I encountered a problem I have never seen before. For some reason, > > requests for Destroy are routing to Edit. > > > Here''s the route: > > DELETE /instructions/:id(.:format) > > {:action=>"destroy", :controller=>"instructions"} > > > Here''s the call to render it: > > <%= link_to ''Delete'', instruction, :confirm => ''Are you > > sure?'', :method => :delete %> > > > This is all from the scaffolding created by Rails. Whenever that link > > is clicked, it routes the user to the Edit page. > > > If I look at the logs, it looks like a GET request is made instead of > > a Delete. > > > Has anyone seen this before? > > > -- > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > ------------------------------------------------------------- > visit my blog athttp://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
Hmm, I uncommented the CSRF meta tag, ensured I was including the default javascripts and restarted, same issue. I have added my own js files, is it likely a conflict with those? On Feb 11, 9:01 am, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Yes, and I did remove the CSRF meta tag. > > Thanks, I''ll look into it! > > On Feb 11, 8:58 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > are you using rails 3? this problem usually occur if you remove the > > javascripts to be used to handle the :confirm argument and the csrf meta > > tag. > > > On Fri, Feb 11, 2011 at 11:46 PM, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi- > > > > I encountered a problem I have never seen before. For some reason, > > > requests for Destroy are routing to Edit. > > > > Here''s the route: > > > DELETE /instructions/:id(.:format) > > > {:action=>"destroy", :controller=>"instructions"} > > > > Here''s the call to render it: > > > <%= link_to ''Delete'', instruction, :confirm => ''Are you > > > sure?'', :method => :delete %> > > > > This is all from the scaffolding created by Rails. Whenever that link > > > is clicked, it routes the user to the Edit page. > > > > If I look at the logs, it looks like a GET request is made instead of > > > a Delete. > > > > Has anyone seen this before? > > > > -- > > > 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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm. > > > To unsubscribe from this group, send email to > > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > For more options, visit this group at > > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > > ------------------------------------------------------------- > > visit my blog athttp://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
hmm, just to be sure, try removing the confirm argument and check if it goes to the destroy action. On Sat, Feb 12, 2011 at 12:05 AM, pete <peterbattaglia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hmm, I uncommented the CSRF meta tag, ensured I was including the > default javascripts and restarted, same issue. > > I have added my own js files, is it likely a conflict with those? > > On Feb 11, 9:01 am, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Yes, and I did remove the CSRF meta tag. > > > > Thanks, I''ll look into it! > > > > On Feb 11, 8:58 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > > > > > > > are you using rails 3? this problem usually occur if you remove the > > > javascripts to be used to handle the :confirm argument and the csrf > meta > > > tag. > > > > > On Fri, Feb 11, 2011 at 11:46 PM, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > > Hi- > > > > > > I encountered a problem I have never seen before. For some reason, > > > > requests for Destroy are routing to Edit. > > > > > > Here''s the route: > > > > DELETE /instructions/:id(.:format) > > > > {:action=>"destroy", :controller=>"instructions"} > > > > > > Here''s the call to render it: > > > > <%= link_to ''Delete'', instruction, :confirm => ''Are you > > > > sure?'', :method => :delete %> > > > > > > This is all from the scaffolding created by Rails. Whenever that > link > > > > is clicked, it routes the user to the Edit page. > > > > > > If I look at the logs, it looks like a GET request is made instead of > > > > a Delete. > > > > > > Has anyone seen this before? > > > > > > -- > > > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > > To unsubscribe from this group, send email to > > > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > > For more options, visit this group at > > > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > > -- > > > ------------------------------------------------------------- > > > visit my blog athttp://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Nope, I removed the confirm and it still goes to Edit. On Feb 11, 9:10 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hmm, just to be sure, try removing the confirm argument and check if it goes > to the destroy action. > > > > > > > > > > On Sat, Feb 12, 2011 at 12:05 AM, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hmm, I uncommented the CSRF meta tag, ensured I was including the > > default javascripts and restarted, same issue. > > > I have added my own js files, is it likely a conflict with those? > > > On Feb 11, 9:01 am, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Yes, and I did remove the CSRF meta tag. > > > > Thanks, I''ll look into it! > > > > On Feb 11, 8:58 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > are you using rails 3? this problem usually occur if you remove the > > > > javascripts to be used to handle the :confirm argument and the csrf > > meta > > > > tag. > > > > > On Fri, Feb 11, 2011 at 11:46 PM, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > > > > > Hi- > > > > > > I encountered a problem I have never seen before. For some reason, > > > > > requests for Destroy are routing to Edit. > > > > > > Here''s the route: > > > > > DELETE /instructions/:id(.:format) > > > > > {:action=>"destroy", :controller=>"instructions"} > > > > > > Here''s the call to render it: > > > > > <%= link_to ''Delete'', instruction, :confirm => ''Are you > > > > > sure?'', :method => :delete %> > > > > > > This is all from the scaffolding created by Rails. Whenever that > > link > > > > > is clicked, it routes the user to the Edit page. > > > > > > If I look at the logs, it looks like a GET request is made instead of > > > > > a Delete. > > > > > > Has anyone seen this before? > > > > > > -- > > > > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > > > To unsubscribe from this group, send email to > > > > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > > -- > > > > ------------------------------------------------------------- > > > > visit my blog athttp://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > ------------------------------------------------------------- > visit my blog athttp://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
hmm. that''s weird. i can''t think of any cause atm. what js framework are you using? On Sat, Feb 12, 2011 at 12:15 AM, pete <peterbattaglia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Nope, I removed the confirm and it still goes to Edit. > > On Feb 11, 9:10 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > hmm, just to be sure, try removing the confirm argument and check if it > goes > > to the destroy action. > > > > > > > > > > > > > > > > > > > > On Sat, Feb 12, 2011 at 12:05 AM, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hmm, I uncommented the CSRF meta tag, ensured I was including the > > > default javascripts and restarted, same issue. > > > > > I have added my own js files, is it likely a conflict with those? > > > > > On Feb 11, 9:01 am, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Yes, and I did remove the CSRF meta tag. > > > > > > Thanks, I''ll look into it! > > > > > > On Feb 11, 8:58 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > are you using rails 3? this problem usually occur if you remove the > > > > > javascripts to be used to handle the :confirm argument and the csrf > > > meta > > > > > tag. > > > > > > > On Fri, Feb 11, 2011 at 11:46 PM, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > > wrote: > > > > > > Hi- > > > > > > > > I encountered a problem I have never seen before. For some > reason, > > > > > > requests for Destroy are routing to Edit. > > > > > > > > Here''s the route: > > > > > > DELETE /instructions/:id(.:format) > > > > > > {:action=>"destroy", :controller=>"instructions"} > > > > > > > > Here''s the call to render it: > > > > > > <%= link_to ''Delete'', instruction, :confirm => ''Are you > > > > > > sure?'', :method => :delete %> > > > > > > > > This is all from the scaffolding created by Rails. Whenever that > > > link > > > > > > is clicked, it routes the user to the Edit page. > > > > > > > > If I look at the logs, it looks like a GET request is made > instead of > > > > > > a Delete. > > > > > > > > Has anyone seen this before? > > > > > > > > -- > > > > > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > > > > To unsubscribe from this group, send email to > > > > > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > > > > For more options, visit this group at > > > > > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > > > > -- > > > > > ------------------------------------------------------------- > > > > > visit my blog athttp://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > For more options, visit this group at > > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > > > -- > > ------------------------------------------------------------- > > visit my blog athttp://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
btw, see if you can figure something out on this thread. http://railsforum.com/viewtopic.php?id=41563 <http://railsforum.com/viewtopic.php?id=41563>good luck! On Sat, Feb 12, 2011 at 12:21 AM, Jim Ruther Nill <jvnill-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hmm. that''s weird. i can''t think of any cause atm. > > what js framework are you using? > > > On Sat, Feb 12, 2011 at 12:15 AM, pete <peterbattaglia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Nope, I removed the confirm and it still goes to Edit. >> >> On Feb 11, 9:10 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > hmm, just to be sure, try removing the confirm argument and check if it >> goes >> > to the destroy action. >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > On Sat, Feb 12, 2011 at 12:05 AM, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> wrote: >> > > Hmm, I uncommented the CSRF meta tag, ensured I was including the >> > > default javascripts and restarted, same issue. >> > >> > > I have added my own js files, is it likely a conflict with those? >> > >> > > On Feb 11, 9:01 am, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > > > Yes, and I did remove the CSRF meta tag. >> > >> > > > Thanks, I''ll look into it! >> > >> > > > On Feb 11, 8:58 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > >> > > > > are you using rails 3? this problem usually occur if you remove >> the >> > > > > javascripts to be used to handle the :confirm argument and the >> csrf >> > > meta >> > > > > tag. >> > >> > > > > On Fri, Feb 11, 2011 at 11:46 PM, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> > > wrote: >> > > > > > Hi- >> > >> > > > > > I encountered a problem I have never seen before. For some >> reason, >> > > > > > requests for Destroy are routing to Edit. >> > >> > > > > > Here''s the route: >> > > > > > DELETE /instructions/:id(.:format) >> > > > > > {:action=>"destroy", :controller=>"instructions"} >> > >> > > > > > Here''s the call to render it: >> > > > > > <%= link_to ''Delete'', instruction, :confirm => ''Are you >> > > > > > sure?'', :method => :delete %> >> > >> > > > > > This is all from the scaffolding created by Rails. Whenever >> that >> > > link >> > > > > > is clicked, it routes the user to the Edit page. >> > >> > > > > > If I look at the logs, it looks like a GET request is made >> instead of >> > > > > > a Delete. >> > >> > > > > > Has anyone seen this before? >> > >> > > > > > -- >> > > > > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > > > > > To unsubscribe from this group, send email to >> > > > > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > > > > > For more options, visit this group at >> > > > > >http://groups.google.com/group/rubyonrails-talk?hl=en. >> > >> > > > > -- >> > > > > ------------------------------------------------------------- >> > > > > visit my blog athttp://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > > To unsubscribe from this group, send email to >> > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > > For more options, visit this group at >> > >http://groups.google.com/group/rubyonrails-talk?hl=en. >> > >> > -- >> > ------------------------------------------------------------- >> > visit my blog athttp://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > > > -- > ------------------------------------------------------------- > visit my blog at http://jimlabs.heroku.com >-- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
It''s a JS problem. I am using a number of mapping libraries but I think the heart of the problem is JQuery, looks like it conflicts with Prototype?? Thanks for your feedback! On Feb 11, 9:26 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> btw, see if you can figure something out on this thread.http://railsforum.com/viewtopic.php?id=41563 > <http://railsforum.com/viewtopic.php?id=41563>good luck! > > On Sat, Feb 12, 2011 at 12:21 AM, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > hmm. that''s weird. i can''t think of any cause atm. > > > what js framework are you using? > > > On Sat, Feb 12, 2011 at 12:15 AM, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> Nope, I removed the confirm and it still goes to Edit. > > >> On Feb 11, 9:10 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > hmm, just to be sure, try removing the confirm argument and check if it > >> goes > >> > to the destroy action. > > >> > On Sat, Feb 12, 2011 at 12:05 AM, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> wrote: > >> > > Hmm, I uncommented the CSRF meta tag, ensured I was including the > >> > > default javascripts and restarted, same issue. > > >> > > I have added my own js files, is it likely a conflict with those? > > >> > > On Feb 11, 9:01 am, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > > > Yes, and I did remove the CSRF meta tag. > > >> > > > Thanks, I''ll look into it! > > >> > > > On Feb 11, 8:58 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> > > > > are you using rails 3? this problem usually occur if you remove > >> the > >> > > > > javascripts to be used to handle the :confirm argument and the > >> csrf > >> > > meta > >> > > > > tag. > > >> > > > > On Fri, Feb 11, 2011 at 11:46 PM, pete <peterbattag...@gmail.com> > >> > > wrote: > >> > > > > > Hi- > > >> > > > > > I encountered a problem I have never seen before. For some > >> reason, > >> > > > > > requests for Destroy are routing to Edit. > > >> > > > > > Here''s the route: > >> > > > > > DELETE /instructions/:id(.:format) > >> > > > > > {:action=>"destroy", :controller=>"instructions"} > > >> > > > > > Here''s the call to render it: > >> > > > > > <%= link_to ''Delete'', instruction, :confirm => ''Are you > >> > > > > > sure?'', :method => :delete %> > > >> > > > > > This is all from the scaffolding created by Rails. Whenever > >> that > >> > > link > >> > > > > > is clicked, it routes the user to the Edit page. > > >> > > > > > If I look at the logs, it looks like a GET request is made > >> instead of > >> > > > > > a Delete. > > >> > > > > > Has anyone seen this before? > > >> > > > > > -- > >> > > > > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> > > > > > To unsubscribe from this group, send email to > >> > > > > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> > > > > > For more options, visit this group at > >> > > > > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > >> > > > > -- > >> > > > > ------------------------------------------------------------- > >> > > > > visit my blog athttp://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> > > To unsubscribe from this group, send email to > >> > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> > > For more options, visit this group at > >> > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > >> > -- > >> > ------------------------------------------------------------- > >> > visit my blog athttp://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > >> For more options, visit this group at > >>http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > > ------------------------------------------------------------- > > visit my blog athttp://jimlabs.heroku.com > > -- > ------------------------------------------------------------- > visit my blog athttp://jimlabs.heroku.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
On Feb 11, 2011, at 11:56 AM, pete wrote:> It''s a JS problem. > > I am using a number of mapping libraries but I think the heart of the > problem is JQuery, looks like it conflicts with Prototype?? > > Thanks for your feedback!Have you replaced the rails.js with the one for jQuery? https://github.com/rails/jquery-ujs -Rob> On Feb 11, 9:26 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> btw, see if you can figure something out on this thread.http://railsforum.com/viewtopic.php?id=41563 >> <http://railsforum.com/viewtopic.php?id=41563>good luck! >> >> On Sat, Feb 12, 2011 at 12:21 AM, Jim Ruther Nill >> <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> hmm. that''s weird. i can''t think of any cause atm. >> >>> what js framework are you using? >> >>> On Sat, Feb 12, 2011 at 12:15 AM, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>> wrote: >> >>>> Nope, I removed the confirm and it still goes to Edit. >> >>>> On Feb 11, 9:10 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>> hmm, just to be sure, try removing the confirm argument and >>>>> check if it >>>> goes >>>>> to the destroy action. >> >>>>> On Sat, Feb 12, 2011 at 12:05 AM, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>>> wrote: >>>>>> Hmm, I uncommented the CSRF meta tag, ensured I was including the >>>>>> default javascripts and restarted, same issue. >> >>>>>> I have added my own js files, is it likely a conflict with those? >> >>>>>> On Feb 11, 9:01 am, pete <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>>>> Yes, and I did remove the CSRF meta tag. >> >>>>>>> Thanks, I''ll look into it! >> >>>>>>> On Feb 11, 8:58 am, Jim Ruther Nill <jvn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>>>>>>> are you using rails 3? this problem usually occur if you remove >>>> the >>>>>>>> javascripts to be used to handle the :confirm argument and the >>>> csrf >>>>>> meta >>>>>>>> tag. >> >>>>>>>> On Fri, Feb 11, 2011 at 11:46 PM, pete >>>>>>>> <peterbattag...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>>>>> wrote: >>>>>>>>> Hi- >> >>>>>>>>> I encountered a problem I have never seen before. For some >>>> reason, >>>>>>>>> requests for Destroy are routing to Edit. >> >>>>>>>>> Here''s the route: >>>>>>>>> DELETE /instructions/:id(.:format) >>>>>>>>> {:action=>"destroy", :controller=>"instructions"} >> >>>>>>>>> Here''s the call to render it: >>>>>>>>> <%= link_to ''Delete'', instruction, :confirm => ''Are you >>>>>>>>> sure?'', :method => :delete %> >> >>>>>>>>> This is all from the scaffolding created by Rails. Whenever >>>> that >>>>>> link >>>>>>>>> is clicked, it routes the user to the Edit page. >> >>>>>>>>> If I look at the logs, it looks like a GET request is made >>>> instead of >>>>>>>>> a Delete. >> >>>>>>>>> Has anyone seen this before?Rob Biedenharn Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org http://AgileConsultingLLC.com/ rab-/VpnD74mH8+00s0LW7PaslaTQe2KTcn/@public.gmane.org http://GaslightSoftware.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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.