Ticket #227 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] Template matching for template.format.engine doesn't work

Reported by: has.s..@gmail.com Assigned to:
Priority: major Milestone: 0.4
Component: Merb Keywords:
Cc:

Description

Currently the automatic mapping of template.format.engine does not work correctly. It is kind of implemented for erubis but does not work for any other template engine. The template.format.engine idea is not currently implemented by merb, at present it just matches based on .html.erb, .js.erb, .herb, .jerb etc file extensions.

This patch keeps backwards compatibility and adds logic to map template.format.engine and fall back on the old extensions if required. This should work with any new mime types added. If respond_to responds to it, it should be picked up.

This is a change where I'm not 100% on code so please review. Tests pass with trunk revision 749

Attachments

template.format.engine.diff (12.1 kB) - added by has.s..@gmail.com on 10/15/07 08:52:11.
template.format.engine_2.diff (20.9 kB) - added by has.s..@gmail.com on 10/16/07 07:02:26.

Change History

10/15/07 08:52:11 changed by has.s..@gmail.com

  • attachment template.format.engine.diff added.

10/16/07 07:02:09 changed by has.s..@gmail.com

Updated the patch to include more stringent specs for backwards compatibility. This showed up some flaws in the original patch. The new style will be selected in favour of the old style extensions.

10/16/07 07:02:26 changed by has.s..@gmail.com

  • attachment template.format.engine_2.diff added.

10/16/07 07:55:38 changed by has.s..@gmail.com

  • status changed from new to closed.
  • resolution set to fixed.

(In [750]) Fixes a bug in the template selection code. Closes #227