This project is archived and is in readonly mode.
render :inline fails inside a fragment cache block
Reported by Markus Koller | July 12th, 2008 @ 06:10 PM | in 2.x
When trying to use render :inline inside a cache block, I get a NoMethodError in /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/helpers/cache_helper.rb:35:in `cache' with the following message:
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.to_sym
If I remove either the cache block or the call to render, everything works fine. Apparently the variable current_render_extension in cache_helper.rb isn't set for some reason.
The code to reproduce this looks like this:
<% cache 'foo' do -%>
<%= render :inline => 'bar' %>
<% end -%>
Comments and changes to this ticket
-
josh July 13th, 2008 @ 06:56 PM
- State changed from new to duplicate
- Assigned user set to josh
#609 has a proposed patch
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Tags
Referenced by
- 609 current_render_extension nil after render :inline I'm not so convinced of my solution any more after comin...