Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

render :inline fails inside a fragment cache block

#605

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 -%>

Reported by Markus Koller · July 12th, 2008 @ 06:10 PM

State: duplicate
Milestone: 2.x
Assigned to: josh josh
Importance: none

Activity

  1. josh
    josh
    • State changed from new to duplicate
    • Assigned user set to josh

    July 13th, 2008 @ 06:56 PM