title: Rails render partial mobile format of view instead of html format
body: <p>I have both mobile and web versions of my rails project, and having problem with ajax calls on production. When I call this part of code on web version, it loads mobile version of site:</p>
  
  <pre><code>$("#items_grid #page").html("&lt;%= escape_javascript(render :partial =&gt; 'shared/catalog_product', :formats =&gt; session[:mobile_param].to_i == 1 ? 'mobile' : 'html') %&gt;")
  </code></pre>
  
  <p>Usually it works fine, but by passing <em>some period of time</em> after deploying it to webserver this miss happens. I can recover it again for a <em>some period of time</em> by adding some changes in <strong>shared/catalog_product.html.erb</strong> file. I guess webserver somehow saves this file in cache, and cannot see difference between <strong>shared/catalog_product.mobile.erb</strong> and <strong>shared/catalog_product.html.erb</strong>
  I am using <strong>nginx+passenger</strong> for deploying project.
  Also I checked, and sure that problem is not in <code>session[:mobile_param].to_i == 1</code></p>