I am totally new to rails and struggle with the easiest stuff. I have the following problem: 

When I try to destroy a search (from my model search) it does not work and I get redirected to "/search.48 (the search with id 48). It gives me the notice "We're sorry, but something went wrong." and in the console it says something with POST. Neither the search is deleted nor the redirect\_to search\_path is working. What am I doing wrong?

This is my controller:

```
def show
    @searches = current_user.searches
end

def destroy
    @search = Search.find(params[:id])
    @search.destroy
    flash[:success] = "Search deleted"
    redirect_to search_path
end

```

This is my view show:

```
<% @searches.each do |search| %> 
<%= search.title %>
<%= search.description %>
<%= button_to "delete", search, method: :destroy %>

```

My routes.rb:

```
get 'search' => 'searches#show'
resources :searches

```

And I also included `<%= javascript_include_tag 'application' %>` in the ***application.html.erb*** as well as `//= require jquery` and `//= require jquery_ujs` in the ***application.js*** file.

So I really can't find my mistake. Can someone help me?