rendering a partial inside another using render_to_string and (:formats) in controller

I want to clean my code by moving the duplicated lines :

partial = render_to_string( :partial => "#{file}", :formats => [:html] )

to the pagination_partials function.

Hi Mathieu,

if you nest partial rendering in Rails you cannot change the format since they manage global variables “for performance reasons”. This is fixed in Cells which could replace your #pagination_partials - give it a try and hit me on the #cells IRC channel :wink: