title: rails ajax request doesn't refresh data
body: <p>i have some troubles with my ajax request in a rails app.</p>
  
  <p>i make a request, i take some params from a link when i click, and then i want to refresh my partial that contains images from my database.</p>
  
  <p>here is my ajax</p>
  
  <pre><code>    $.ajax({
  
          url:"gallery",
          data: { pie :categoria},
          type: "GET",
          async: true,
          dataType: "script"
  
  
      });
  </code></pre>
  
  <p>the thing is that in the rails shell i get passed on my params.
  but it doesnt make any changes to the view.</p>
  
  <hr>
  
  <p>my shell:</p>
  
  <pre><code>Started GET "/gallery?pie=VibPellizcables&amp;_=1375047201412" for 127.0.0.1 at Sun Jul 28 18:33:21 -0300 2013
  Processing by GalleryController#pro as JS
    Parameters: {"pie"=&gt;"VibPellizcables", "_"=&gt;"1375047201412"}
    Product Load (0.1ms)  SELECT `products`.* FROM `products` WHERE `products`.`pie` = 'VibPellizcables'
    Rendered sexytoys/_algo.html.haml (0.1ms)
  Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)
  </code></pre>
  
  <hr>
  
  <p>i want to update a partial which contains images from my database. </p>
  
  <p>this is the partial i want to update.</p>
  
  <pre><code>  #miniDiv 
  
      %ul#miniRecuadro
        - @products.each do |product|
          %li.mini= image_tag product.pic.url(:thumb)
  </code></pre>
  
  <p>my controller:</p>
  
  <pre><code>      def gallery
          @products = Product.find(:all, :conditions =&gt; {:pie =&gt; params[:pie]})
          #render :partial =&gt; "algo"
          flash[:notice] = "Mensaje ENVIADO &gt;&gt;"
          respond_to do |format|
  
            format.js {render :partial =&gt; 'algo', :conditions =&gt; {:pie =&gt; params[:pie]}}
           # format.json { render :json =&gt; @products  }
          end
  </code></pre>