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.

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

#1026

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.

Reported by Daniel Azuma · September 11th, 2008 @ 06:16 PM

State: wontfix
Milestone: 2.x
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Daniel Azuma
    Daniel Azuma

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

    September 11th, 2008 @ 06:26 PM

  2. josh
    josh
    • 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?

    September 11th, 2008 @ 06:35 PM