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 shorthands dont's work with namespaced controllers

#143

This ticket refers to http://dev.rubyonrails.org/ticke... and contains up-to-date patch.

This patch allows render shorthands (such as render :partial => @people) work properly in namespaced controllers.

Given a Nest::NestedController you can:

render :partial => @person

or

render :partial => @people

and expect the nest/people/_person to be used.

Reported by Jacek Becela · May 9th, 2008 @ 10:00 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Pratik
    Pratik
    • State changed from new to resolved

    May 11th, 2008 @ 07:33 PM

  2. Gravis
    Gravis
    • Tag set to actionpack, patch, tested

    I'm having an issue with namespaced view, very close to this ticket.
    Indeed, everything works fine if I use a single resource, like in the unit tests of the patch.
    Anyway, I'm using a polymorphic association, returning different kinds of objects in an Array (ie: @user.posts where posts can be AudioPost and TextPost for example). In this case, the path is incorrect and rails is looking for the views in app/views/audio_posts/audio_post.html.haml instead of app/views/posts/audio_posts/audio_post.html.haml

    Thanks

    January 18th, 2010 @ 10:39 AM