Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Missing template for missing partial due to format confusion #5308

rgarver opened this Issue Mar 6, 2012 · 2 comments


None yet
3 participants

rgarver commented Mar 6, 2012

In Rails 3.2.2 if you render a template of a different format from the page (eg, embedding some json via jbuilder) the layout will start trying to render any partials as that format (json in the example earlier).


%h1 Hi
  window.userJSON = #{render(:template => "users/show.json").html_safe}


    =render :partial => 'layouts/analytics'

The above will fail unless I append , :formats => [:html] to the analytics partial.

I've put together a simple example of the failure case below:


This may be related to #5025

@josevalim josevalim closed this in bcea8cd Mar 7, 2012


spastorino commented Mar 7, 2012

@rgarver please test it again, against 3-2-stable and let us know


rgarver commented Mar 7, 2012

Looking good!

@drogus drogus added a commit to drogus/rails that referenced this issue Mar 17, 2012

@drogus drogus Add missing test for #5308 7130f91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment