# Changing Views' Extensions

**URL:** <https://www.ruby-forum.com/t/changing-views-extensions/140173>\
**Category:** Rails\
**Created:** [June 11, 2008, 3:25pm UTC](https://www.ruby-forum.com/t/changing-views-extensions/140173 "2008-06-11T15:25:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9de0a6/32.png) [@prasad](https://www.ruby-forum.com/u/prasad)\
**Post date:** [June 11, 2008, 3:25pm UTC](https://www.ruby-forum.com/t/changing-views-extensions/140173/1 "2008-06-11T15:25:18Z")

</div>

Hi,

Is there a way to change to the views’ file extensions from .rhtml  
to .html ?? If yes, how can I do that?

Thanks,  
Prasad

---

<div class="post-metadata">

**Author:** ![prasad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9de0a6/32.png) [@prasad](https://www.ruby-forum.com/u/prasad)\
**Post date:** [June 11, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/changing-views-extensions/140173/2 "2008-06-11T16:01:11Z")

</div>

On 11 Jun 2008, at 14:24, Prasad wrote:

> Hi,
> 
> Is there a way to change to the views’ file extensions from .rhtml  
> to .html ?? If yes, how can I do that?

Not quite sure why you would want to do that, but  
ActionView::Template.register\_template\_handler :html,  
TemplateHandlers::ERB  
might do the trick (in rails 2.1)

Fred
