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.

Layout for does not accept objects as in the docs from Rails 2.3

#5357

Reported by Carlos Antonio da Silva · August 11th, 2010 @ 02:22 PM

State: resolved
Milestone: none
Assigned to: José Valim José Valim
Importance: none

Activity

  1. Carlos Antonio da Silva
    Carlos Antonio da Silva

    From the docs:

    <%= render :layout => "my_layout" do |customer| %>
      Hello <%= customer.name %>
    <% end %>
    
    # The layout
    <html>
      <%= yield Struct.new(:name).new("David") %>
    </html>
    

    This does not work as expected, the content inside the render block is not being generated.
    By using yield without any param, the content is generated, but no variable is available.

    August 11th, 2010 @ 02:25 PM

  2. Repository
    Repository
    • State changed from new to resolved

    August 11th, 2010 @ 02:26 PM

  3. Repository