Forum: Ruby on Rails render problems in upgrading from 2.1.2 to 2.3.2

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bharat R. (Guest)
on 2009-04-10 05:46
My custom layout file for the AdminController in in
views/layouts/admin.html.erb and has the following code:

<% content_for :secondary_nav do %>
  <%= sub_navigation [:prospect_statuses, :client_statuses,
:business_statuses, :discounts, :features, :links, :user_types] %>
<% end %>
<%= render "layouts/application" %>

This works fine in Rails 2.1.2.  However, in Rails 2.3.2, I get the
following error:

 Showing app/views/layouts/admin.html.erb where line #4 raised:

Missing layout layouts/_application in view path app/views

Extracted source (around line #4):

1: <% content_for :secondary_nav do %>
2:   <%= sub_navigation [:prospect_statuses, :client_statuses,
:business_statuses, :discounts, :features, :links, :user_types] %>
3: <% end %>
4: <%= render "layouts/application" %>

Can't figure this out.  Please help.

Thanks.

Bharat
Bharat R. (Guest)
on 2009-04-10 05:53
Found the solution here:

http://ryandaigle.com/articles/2008/11/20/what-s-n...

Changed the 4th line to:

<%= render :file => "layouts/application" %>

That solved the problem.  Please disregard.  Apologies for the trouble.

Bharat
This topic is locked and can not be replied to.