{"action":"opened","issue":{"url":"https://api.github.com/repos/ciprianna/07-21-RESTful_rails/issues/1","labels_url":"https://api.github.com/repos/ciprianna/07-21-RESTful_rails/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/ciprianna/07-21-RESTful_rails/issues/1/comments","events_url":"https://api.github.com/repos/ciprianna/07-21-RESTful_rails/issues/1/events","html_url":"https://github.com/ciprianna/07-21-RESTful_rails/issues/1","id":96395934,"number":1,"title":"Route Path Error","user":{"login":"ciprianna","id":8051967,"avatar_url":"https://avatars.githubusercontent.com/u/8051967?v=3","gravatar_id":"","url":"https://api.github.com/users/ciprianna","html_url":"https://github.com/ciprianna","followers_url":"https://api.github.com/users/ciprianna/followers","following_url":"https://api.github.com/users/ciprianna/following{/other_user}","gists_url":"https://api.github.com/users/ciprianna/gists{/gist_id}","starred_url":"https://api.github.com/users/ciprianna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciprianna/subscriptions","organizations_url":"https://api.github.com/users/ciprianna/orgs","repos_url":"https://api.github.com/users/ciprianna/repos","events_url":"https://api.github.com/users/ciprianna/events{/privacy}","received_events_url":"https://api.github.com/users/ciprianna/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-21T19:15:48Z","updated_at":"2015-07-21T19:15:48Z","closed_at":null,"body":"I've defined two route paths in my route file:\r\n\r\n~~~ ruby\r\n  get \"delete_profile\" => \"users#delete\"\r\n\r\n  delete \"confirm_delete\" => \"users#confirm_delete\"\r\n~~~\r\n\r\nThe corresponding methods for each of those paths are here, in the users_controller file:\r\n\r\n~~~ ruby\r\n  def delete\r\n  end\r\n\r\n  def confirm_delete\r\n    if params[\"confirm_delete\"] == \"yes\"\r\n      user = User.find(session[:user_id])\r\n      user.delete\r\n      session[:user_id] = nil\r\n      redirect_to \"users\"\r\n    else\r\n      redirect_to \"users\"\r\n    end\r\n  end\r\n~~~\r\n\r\nI can get to the delete view fine, which has this form:\r\n\r\n~~~ html\r\n<div>\r\n  <h2>Are you sure you wish to delete your account?</h2>\r\n  <%= form_tag('/confirm_delete', method: \"delete\") do %>\r\n    <input type=\"radio\" name=\"confirm_delete\" value=\"yes\">Yes\r\n    <input type=\"radio\" name=\"confirm_delete\" value=\"no\">No<br>\r\n    <!-- <input type=\"hidden\" name=\"_method\" value=\"delete\"> -->\r\n    <input type=\"submit\">\r\n  <% end %>\r\n</div>\r\n~~~\r\n\r\nAfter clicking submit, I expect to be redirected back to the \"users\" path.  What I actually get is this error message:\r\n~~~\r\nNo route matches [GET] \"/confirm_delete\"\r\n~~~\r\n\r\nIt looks like it's still trying to route it using a \"get\" instead of \"delete\".  Any ideas?"}}