This project is archived and is in readonly mode.

#143 ✓resolved
Jacek Becela

Render shorthands dont's work with namespaced controllers

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

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.

Comments and changes to this ticket

  • Pratik

    Pratik May 11th, 2008 @ 07:33 PM

    • State changed from “new” to “resolved”
  • Gravis

    Gravis January 18th, 2010 @ 10:39 AM

    • 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

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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages