# Custom Templates Broken on Edge

**URL:** <https://discuss.rubyonrails.org/t/custom-templates-broken-on-edge/2145>\
**Category:** rubyonrails-core\
**Created:** [September 25, 2006, 4:28pm UTC](https://discuss.rubyonrails.org/t/custom-templates-broken-on-edge/2145 "2006-09-25T16:28:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hampton](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hampton/32/2616_2.png) [@Hampton](https://discuss.rubyonrails.org/u/Hampton)\
**Post date:** [September 25, 2006, 4:28pm UTC](https://discuss.rubyonrails.org/t/custom-templates-broken-on-edge/2145/1 "2006-09-25T16:28:28Z")

</div>

It seems that the format.html, format.xml, format.\* response code has a slight problem with it. It seems that it is now taking any request for format.html and assuming that means... "#{actionname}.rhtml"... and that's definitely not cool for .haml and .mab people.

Instead, we should append an r for xml and rss.... and leave ActionView's clever "template finding" code go to work to determine what we should do for html.

I don't think its wrong to assume that AV should make basic assumptions that without a specialized ending, that we are talking about some sort of html renderer. This was the assumption up to a few weeks ago when the code in there got a little "cleanup" into a one-liner. Which, indeed is much prettier, however it leaves us delegate render people in the dust.

The patch is up and ready to go!

Its a simple exception for :html.

[http://dev.rubyonrails.org/ticket/6281](http://dev.rubyonrails.org/ticket/6281)

Cheers!

-hampton.

---

<div class="post-metadata">

**Author:** ![DHH](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/dhh/32/618_2.png) [@DHH](https://discuss.rubyonrails.org/u/DHH)\
**Post date:** [September 27, 2006, 10:45pm UTC](https://discuss.rubyonrails.org/t/custom-templates-broken-on-edge/2145/2 "2006-09-27T22:45:05Z")

</div>

This looks good, but it lacks tests. Let me know when you have tests ready for it and I'll apply.

---

<div class="post-metadata">

**Author:** ![Hampton](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hampton/32/2616_2.png) [@Hampton](https://discuss.rubyonrails.org/u/Hampton)\
**Post date:** [October 3, 2006, 11:49pm UTC](https://discuss.rubyonrails.org/t/custom-templates-broken-on-edge/2145/3 "2006-10-03T23:49:41Z")

</div>

Alright, tests now exist! Took a little trickery because of the way that gets work, but I am now testing how render is called with defaults!

Ready for fantastical application!

[http://dev.rubyonrails.org/ticket/6281](http://dev.rubyonrails.org/ticket/6281)

-hampton.

PS: "fantastical application" is trademark of Hampton Catlin of Toronto, ON. All rights reserved in your usual corner booth.

---

<div class="post-metadata">

**Author:** ![Hampton](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hampton/32/2616_2.png) [@Hampton](https://discuss.rubyonrails.org/u/Hampton)\
**Post date:** [October 8, 2006, 4:33pm UTC](https://discuss.rubyonrails.org/t/custom-templates-broken-on-edge/2145/4 "2006-10-08T16:33:19Z")

</div>

Any chance of this getting applied soon?

I keep having to patch all of my projects that I'm using the new REST stuff in.

I keep getting ActionController::MissingTemplate (Missing template /show.rhtml.rhtml) and I keep getting HAML bug reports about this.

-hampton.
