#6 ✓moved_to_github
Brian McManus

Rendering Partials with contextual_views turned on.

Reported by Brian McManus | June 9th, 2009 @ 04:59 PM

I found it a bit unintuitive where the partials needed to be when I turned on contextual_views. Examples:

render @models # Partial _model.html.haml needed to be in views/models/ to be found.

render :partial => "form", :object => f # Partial _form.html.haml needed to be in the context subfolder e.g. views/models/root

I'm not sure why there's a discrepancy here.

Comments and changes to this ticket

  • Ben Johnson

    Ben Johnson June 9th, 2009 @ 05:04 PM

    • State changed from “new” to “open”

    Take Resourcelogic away and Rails does this for all of the controller sub folders. But when you jump down into a sub folder under each controller rails still looks for the template in the controller subfolder, not the context sub folder. I figured it was more intuitive that if you were in users/admin and called the "user" partial it would look for users/admin/user and not users/user. Does that make sense?

    I guess what Resourcelogic could do is check for the more specific and then check for the template a level above that.

    What do you think?

  • Ben Johnson

    Ben Johnson August 7th, 2009 @ 06:34 PM

    • State changed from “open” to “moved_to_github”

    [state:"moved_to_github" bulk edit command]

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Adds context into the RESTful development style.

People watching this ticket