# Rails MIME type/template engine wrong selection for RSS?

**URL:** <https://www.ruby-forum.com/t/rails-mime-type-template-engine-wrong-selection-for-rss/129398>\
**Category:** Rails\
**Created:** [February 18, 2008, 9:28am UTC](https://www.ruby-forum.com/t/rails-mime-type-template-engine-wrong-selection-for-rss/129398 "2008-02-18T09:28:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8e7dd6/32.png) [@Kip](https://www.ruby-forum.com/u/Kip)\
**Post date:** [February 18, 2008, 9:28am UTC](https://www.ruby-forum.com/t/rails-mime-type-template-engine-wrong-selection-for-rss/129398/1 "2008-02-18T09:28:35Z")

</div>

In my RESTful app, I have 4 templates for different mime types/formats  
(example, below). How do I tell Rails (2.0.2) to use the Builder  
template engine as default for rss, or at least look for it at render  
time for the RSS MIME Type? Currently it tries to use an erb template  
as default.

index.atom.builder  
index.rss.builder  
index.xml.builder  
index.html.erb

My controller action is basically:

def index  
@galleries = Gallery.find(:all)  
end

Results:  
/galleries.rss generates a No Template exception because it tries to  
find index.rss.erb instead of index.rss.builder  
/galleries.xml seems OK (Browser reports 406 Not Acceptable in  
Safari)  
/galleries.atom works fine (index.atom.builder)  
/galleries works fine (index.html.erb)

I know I can coerce the template to be used, but that seems unclean in  
a Rails 2.0 environment. Is there a configuration option to set to  
get the right template engine to be invoked?

Any advice appreciated,

–Kip
