{"action":"created","issue":{"url":"https://api.github.com/repos/cantino/huginn/issues/531","repository_url":"https://api.github.com/repos/cantino/huginn","labels_url":"https://api.github.com/repos/cantino/huginn/issues/531/labels{/name}","comments_url":"https://api.github.com/repos/cantino/huginn/issues/531/comments","events_url":"https://api.github.com/repos/cantino/huginn/issues/531/events","html_url":"https://github.com/cantino/huginn/issues/531","id":43642322,"number":531,"title":"Deleting an agent from the agent's `show` action will redirect to non-existent agent","user":{"login":"amoeba","id":563,"avatar_url":"https://avatars.githubusercontent.com/u/563?v=3","gravatar_id":"","url":"https://api.github.com/users/amoeba","html_url":"https://github.com/amoeba","followers_url":"https://api.github.com/users/amoeba/followers","following_url":"https://api.github.com/users/amoeba/following{/other_user}","gists_url":"https://api.github.com/users/amoeba/gists{/gist_id}","starred_url":"https://api.github.com/users/amoeba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amoeba/subscriptions","organizations_url":"https://api.github.com/users/amoeba/orgs","repos_url":"https://api.github.com/users/amoeba/repos","events_url":"https://api.github.com/users/amoeba/events{/privacy}","received_events_url":"https://api.github.com/users/amoeba/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cantino/huginn/labels/issue","name":"issue","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-09-23T15:17:34Z","updated_at":"2016-02-15T17:17:37Z","closed_at":null,"body":" As in the subject, deleting an agent from the agent's `show` action will attempt to redirect the user back to the agent's `show` action which will result in an error. Is this intended behavior?\r\n\r\nA quick scan (I'm new to Huginn) shows that you can only find a link to `destroy` and agent in two locations: (1) the agents list and the agent's `show` action itself. In both cases, the user probably wants to be redirected to the agents list.\r\n\r\nThe current method in https://github.com/cantino/huginn/blob/master/app/controllers/agents_controller.rb:\r\n ```\r\ndef destroy\r\n    @agent = current_user.agents.find(params[:id])\r\n    @agent.destroy\r\n\r\n    respond_to do |format|\r\n      format.html { redirect_back \"'#{@agent.name}' deleted\" }\r\n      format.json { head :no_content }\r\n    end\r\n  end\r\n```\r\n\r\nIf you agree, I could PR this."},"comment":{"url":"https://api.github.com/repos/cantino/huginn/issues/comments/184309802","html_url":"https://github.com/cantino/huginn/issues/531#issuecomment-184309802","issue_url":"https://api.github.com/repos/cantino/huginn/issues/531","id":184309802,"user":{"login":"amoeba","id":563,"avatar_url":"https://avatars.githubusercontent.com/u/563?v=3","gravatar_id":"","url":"https://api.github.com/users/amoeba","html_url":"https://github.com/amoeba","followers_url":"https://api.github.com/users/amoeba/followers","following_url":"https://api.github.com/users/amoeba/following{/other_user}","gists_url":"https://api.github.com/users/amoeba/gists{/gist_id}","starred_url":"https://api.github.com/users/amoeba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amoeba/subscriptions","organizations_url":"https://api.github.com/users/amoeba/orgs","repos_url":"https://api.github.com/users/amoeba/repos","events_url":"https://api.github.com/users/amoeba/events{/privacy}","received_events_url":"https://api.github.com/users/amoeba/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T17:17:37Z","updated_at":"2016-02-15T17:17:37Z","body":"Just an FYI, I'm not reproducing this with a Huginn instance I refreshed from source two weeks ago."}}