This project is archived and is in readonly mode.

#605 ✓duplicate
Markus Koller

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

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=""></a>

People watching this ticket


Referenced by