Skip to content

3.2.14 - Partials not Rendering Properly #11605

Closed
bballer320xu opened this Issue Jul 26, 2013 · 13 comments

5 participants

@bballer320xu

Upon upgrading my application from 3.2.12 to 3.2.14, I noticed that many of my partials aren't rendering. Where I would expect my form, there is nothing being produced. Upgrading to 3.2.13 does not introduce this issue as partials are correctly rendered.

Copying and pasting the partial into the location where the partial is rendered appears to resolve the issue, though it is not a viable alternative.

Here is the index.html.erb code that renders the _form.html.erb file:
screenshot_255

I have 2 form partials, one with a .js extension. I wonder if this is confusing the engine? Here is a screenshot of my directory

screenshot_253

@rafaelfranca
Ruby on Rails member

Was the issue solved?

@bballer320xu

Not sure why this was closed. I'll reopen.

@bballer320xu bballer320xu reopened this Jul 26, 2013
@rafaelfranca
Ruby on Rails member

Could you create an application reproducing the issue? I have a project running on this same version and I didn't got this error

@bballer320xu

I'll try now and report back findings.

@bballer320xu

I can confirm that I can reproduce this issue on a new 3.2.14 application. Here is the index.html.erb template:
screenshot_256

Here is the partial:
screenshot_258

Here is the page output:
screenshot_259

Here is the contents of the "test" view directory:
screenshot_260

@rafaelfranca
Ruby on Rails member

Thank you for confirming.

@bballer320xu

My initial inclination is correct. It is in fact trying to render the .js file. I put this into the .js template:
screenshot_262

Here is the page response:
screenshot_261

@rafaelfranca
Ruby on Rails member

Yes. I was reviewing the commits list and this was one of my suspects.

@bballer320xu

Excellent. I'll let you drive it from here. Thanks for the quick response!

@seanfreiburg

I think the question is, should Rails default to something, or is this up to the user to choose.

@kassio
kassio commented Aug 9, 2013

IMHO rails should render html by default.

@rafaelfranca
Ruby on Rails member
@kassio kassio added a commit that referenced this issue Aug 24, 2013
@kassio kassio fix issue #11605 424a5a7
@jasonkim

It doesn't look like this was merged into rails 4 (maybe because the files got moved around?). Can someone please check? Is this an error, or intended?

https://github.com/rails/rails/commits/master/actionpack/lib/action_view/renderer/abstract_renderer.rb
vs
https://github.com/rails/rails/commits/3-2-stable/actionpack/lib/action_view/renderer/abstract_renderer.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.