隐藏div删除ajax rails

I have a button in my rails app that generates a div with an image and a delete button in it. When I click delete I want the div to be destroyed and to disappear with ajax.

html.erb:

<div class="button">
    <%= link_to "Generate Mockups",  { :controller => :ideas, :action => 
 :generate_mockups, remote: true, :id => idea.permalink} %>
  </div>
  <% idea.mockups.each do |mockup| %>
      <div class="idea-mockup <% if mockup.dirty %>dirty<% end %>">
    <h3><%= mockup.name %></h3>
    <p>
      <%= link_to "Delete", mockup_path(mockup), id: 'delete_mockups',  :method =>:delete, 
 :confirm => "Are you sure you want to delete this idea?",  :remote => true %>
    </p>
    <p>
      <%= link_to image_tag(mockup.file.url(:icon)), mockup.file.url, :target => "_blank", 
 :alt => mockup.description, :title => mockup.description %>
    </p>
    <% if mockup.dirty %>
        <p> The art or mockup template has been modified, and this mockup is being 
 recreated </p>
    <% end %>
  </div>
  <% end %>
</div>

ideas controller :

def generate_mockups
    @idea = Idea.find_by_permalink(params[:id])
    begin
      @idea.generate_mockups
    rescue Exception => e
     flash[:error] = "There was an error generating the mockups for #{@idea.working_name}! 
 #{e.message}"
    end
respond_to do |format|
  flash.now[:notice] = "Successfully generated mockups for #{@idea.working_name}"
  format.html {redirect_to idea_url(params[:id])}
  format.js
 end
 end

mockup controller: def destroy Mockup.find(params[:id]).destroy flash[:notice] = "Mockup destroyed." redirect_to mockups_url end

When I click the delete button inside the div, I want the mock to be destroyed and hidden with ajax