This project is archived and is in readonly mode.

#1026 ✓wontfix
Daniel Azuma

:use_full_path no longer defaults to true in render from view (2.1.1 regression)

Reported by Daniel Azuma | September 11th, 2008 @ 06:16 PM | in 2.x

In <= 2.1.0, calling render(:file => ...) from a view defaults the :use_full_path setting to true. Thus, it was possible to render(:file => 'blog/my_widget') from a view, and it would render app/views/blog/my_widget.html.erb as a subtemplate.

In 2.1.1, the above usage broke as a result of this patch: http://github.com/rails/rails/co...

The behavior in 2.1.1 causes use_full_path to effectively default to false for views. Thus, it is now necessary to explicitly set use_full_path in the above example. e.g. render(:file => 'blog/my_widget', :use_full_path => true). I do not believe this was the intent since it entails an API change that wasn't documented in the release notes.

Please find enclosed a simple patch that restores the default of :use_full_path to true. It should be applied against rails/actionpack/lib/action_view/base.rb in the 2-1-stable branch.

Comments and changes to this ticket

  • Daniel Azuma

    Daniel Azuma September 11th, 2008 @ 06:26 PM

    Sorry, I screwed up the patchfile. Revised patchfile attached.

  • josh

    josh September 11th, 2008 @ 06:35 PM

    • State changed from “new” to “wontfix”
    • Assigned user set to “Pratik”

    use_full_path has been depreciated in 2.2 and should automatically fall back to the full path if no template exists.

    You should probably include some unit tests for this behavior as well.

    @Pratik, Not sure if its worth applying?

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