title: rails 5 render on JS request
body: <p>Hi am trying to render a index page particular part from same index controller response i am don't know is it possible or not.. </p>
  
  <p>This is Index Controller code </p>
  
  <pre><code>def index
  @songs = Song.language_fillter(params[:language]).category_fillter(params[:category]).paginate(:page =&gt;params[:page], :per_page =&gt; 6)
  @languages = Song.distinct.select(:language)
  @category = Song.distinct.select(:category)
  respond_to do |format|
    format.html{}
    format.js{ render partial: 'songs/songshow', :collection =&gt; @songs, :layout =&gt; false}
  end
  end
  </code></pre>
  
  <p>index.html.erb</p>
  
  <pre><code>&lt;ul class="nav justify-content-center mt-3"&gt;
   &lt;li class="nav-item"&gt;
    &lt;select class="custom-select song_filter" id="language_filter"&gt;
    &lt;option value=""selected&gt;Language&lt;/option&gt;
    &lt;% @languages.each do |lang| %&gt;
      &lt;option value="&lt;%= lang.language %&gt;"&gt;&lt;%= lang.language %&gt;&lt;/option&gt;
    &lt;% end %&gt;
  &lt;/select&gt;
  &lt;/li&gt;
  &lt;li class="nav-item"&gt;
     &lt;select class="custom-select song_filter" id="category_filter"&gt;
       &lt;option value="" selected&gt;Category&lt;/option&gt;
       &lt;% @category.each do |cat| %&gt;
       &lt;option value="&lt;%= cat.category %&gt;"&gt;&lt;%= cat.category %&gt;&lt;/option&gt;
       &lt;% end %&gt;
     &lt;/select&gt;
   &lt;/li&gt;
  &lt;/ul&gt;
     &lt;div class="container"&gt;
   &lt;div class="mt-5 row" id="songs_display"&gt;
       &lt;%= render partial: 'songshow' %&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>in this i like to change the content of id songs_display with CoffeeScript </p>
  
  <pre><code>$(document).on 'change', '.song_filter', () -&gt;
    language = $('#language_filter').val()
    category = $('#category_filter').val()
    console.log language+" "+category
    $.ajax '/songs',
    type:'GET'
    data:{language: language,category: category }
    dataType: 'text'
    success: (data,textStatus,jqXHR) -&gt;
      $('#songs_display').html data
  </code></pre>
  
  <p>by this i like to it should render only the partial but it render layout also but i want only it should render partial. is it possible..</p>