title: Ruby on rails destroy not working
body: <p>I can't get destroy method to work. When I click on delete, nothing happens. No confirmation pop up, the post doesn't get deleted. 
  The method in controller: </p>
  
  <pre><code>def destroy
      @post = Post.find(params[:id])
      @post.destroy
      redirect_to posts_path, :notice =&gt; "Your post has been deleted successfully."
  end
  </code></pre>
  
  <p>The view:</p>
  
  <pre><code>&lt;%= link_to "Delete post", @post, data: { confirm: "Are you sure?" }, :method =&gt; :delete %&gt;
  </code></pre>
  
  <p>Rendered HTML:</p>
  
  <pre><code>&lt;a data-confirm="Are you sure?" rel="nofollow" data-method="delete" href="/posts/8"&gt;Delete post&lt;/a&gt;
  </code></pre>
  
  <p>application.html.erb file is as ror created it:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Myrubyblog&lt;/title&gt;
    &lt;%= stylesheet_link_tag 'application', media: 'all', 'dataturbolinks-track' =&gt; true %&gt;
    &lt;%= javascript_include_tag 'application', 'data-turbolinks-track' =&gt; true %&gt;
    &lt;%= csrf_meta_tags %&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;% flash.each do |key, value| %&gt;
  &lt;p&gt;&lt;%= value %&gt;&lt;/p&gt;
  &lt;% end %&gt;
  &lt;%= yield %&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Edit and everything else works fine. Any ideas to make this work? Thanks </p>
  
  <p>SOLVED! 
  The problem was in application.html.erb file, javascript_include_tag. When I started this project, I was getting 'Rails ExecJS::ProgramError in Pages#home', so I changed javascript_include_tag 'application' into 'default' (as people said in this thread stackoverflow.com/questions/28421547/…). Now I updated it into 'application' and it works as it supposed to. Thanks, Kevin!</p>