This project is archived and is in readonly mode.

#1798 ✓resolved
Daniel Guettler

Render template without TemplateHandler extension

Reported by Daniel Guettler | January 26th, 2009 @ 04:47 PM

If you try to render a template which doesn't have a TemplateHandler extension it raises a MissingTemplate exception even so the file exists in the view_paths. E.g. if you have a file 'hello_world.js' which you try to render like this:


render :file => 'hello_world.js'

_pick_template doesn't find it an exception is thrown.

Comments and changes to this ticket

  • DHH

    DHH February 5th, 2009 @ 08:11 PM

    • Assigned user changed from “Pratik” to “josh”
    • Milestone cleared.
  • josh

    josh February 5th, 2009 @ 09:46 PM

    • State changed from “new” to “wontfix”

    You should not need to add another conditional to the path finder. This should be handled by the template. The template should still be valid with a nil extension. But It looks like this case is already properly handled.

    Also, the tests pass w/o the actual patch. Maybe it was already unintentionally fixed?

  • Daniel Guettler

    Daniel Guettler February 5th, 2009 @ 10:05 PM

    Right it's fixed in the master branch and in tag v2.3.0 since it again changed the whole template business... The patch applies to the 2.2-stable branch as I tried to indicate by setting the "2.2-stable" tag.

  • Repository

    Repository February 5th, 2009 @ 10:10 PM

    • State changed from “wontfix” to “resolved”

    (from [be4ecc2e64cee529922f5cc5a49c56e444e5d869]) check for template with specified extension but without template handler extension [#1798 state:resolved]

    Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...

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

Referenced by

Pages