title: remove comment from view using AJAX rails
body: <p>I have a directory app that has comments. I add and delete comments with <code>remote: true</code> and I want to fade them out in my view with Jquery. </p>
  
  <p>How do I go about getting a reference to the comment I want to fade out in the view? I can delete the comment just fine, but I don't know how to fade the comment out in my view </p>
  
  <p>Here is my controller:</p>
  
  <pre><code>class CommentsController &lt; ApplicationController
    def create
      business = Business.find(params[:business_id])
      new_comment = business.comments.create
      new_comment.comment = params[:comment_text]
      new_comment.save
      respond_to do |format|
        format.html {redirect_to business}
        format.js
      end
    end
  
    def destroy
      business = Business.find(params[:business])
      comment = Comment.find(params[:id])
      comment.destroy!
      params[:id] = business.id
      respond_to do |format|
        format.html {redirect_to business_url(id: params[:id])}
        format.js 
      end
    end
  end
  </code></pre>
  
  <p>Comments are rendered in my business view like this: </p>
  
  <pre><code>&lt;aside class="comment-section"&gt;
      &lt;h4 class="thin-grey-underline"&gt;&lt;span class="glyphicon glyphicon-comment glyphicon-left-space"&gt;&lt;/span&gt; Reviews &lt;/h4&gt;
      &lt;% if !@business.comments.empty? %&gt;
        &lt;% @business.comments.each do |comment| %&gt;
          &lt;div id="comments"&gt;
            &lt;%= render partial: 'comment', locals: {comment: comment, business: @business} %&gt;
          &lt;/div&gt;
        &lt;% end %&gt;
      &lt;% else %&gt;
        &lt;p&gt; No reviews yet... &lt;/p&gt;
      &lt;% end %&gt;
      &lt;%= render partial: 'comments_form' %&gt;
    &lt;/aside&gt;
  </code></pre>
  
  <p>my single comment partial: </p>
  
  <pre><code>&lt;div class="row single-comment vertical-align"&gt;
    &lt;div class="col-sm-12 col-md-3"&gt;
      &lt;div class="profile-image" style="background: url('&lt;%= business.profile_image_url(:thumb).to_s %&gt;') no-repeat; background-position:center"&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="col-sm-12 col-md-9"&gt;
      &lt;h5&gt;&lt;%= comment.title %&gt;&lt;/h5&gt;
      &lt;p&gt;&lt;%= comment.comment %&gt;&lt;/p&gt;
      &lt;%= button_to(business_comment_path(@business.id,comment.id), {method: :delete, remote: true, class:"btn btn-danger delete-comment-button pull-right", params:{id: comment.id, business: business.id}} ) do%&gt;
        &lt;i class="glyphicon glyphicon-trash"&gt;&lt;/i&gt;
      &lt;% end %&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>the form partial to create a new comment: </p>
  
  <pre><code>&lt;div class="row"&gt;
    &lt;div class="col-sm-12 col-md-12"&gt;
      &lt;div class="comments-form"&gt;
        &lt;%= form_tag(business_comments_path(@business), html: { id: "comment-form" }, method: 'post', remote: true) do %&gt;
          &lt;h5 class="thin-grey-underline"&gt;&lt;span class="glyphicon glyphicon-pencil glyphicon-left-space"&gt;&lt;/span&gt; Write a Review &lt;/h5&gt;
          &lt;%= text_area_tag(:comment_text,nil, class: "comment-form-input")%&gt;
          &lt;%= hidden_field_tag 'business_id', params[:id] %&gt;
          &lt;%= submit_tag("Comment", class:"btn btn-primary") %&gt;
        &lt;% end %&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>If I have a list of comments, how do I delete a specific comment by clicking on the delete link and also have it removed from my view in a fadeout manner?</p>
  
  <p>I have a destroy.js.erb file that gets called, but I don't know how to get a reference to fade out the specific comment.. not sure if I am explaining myself clearly here</p>