# Respond\_to and format

**URL:** <https://www.ruby-forum.com/t/respond-to-and-format/148293>\
**Category:** Rails\
**Created:** [September 11, 2008, 12:50pm UTC](https://www.ruby-forum.com/t/respond-to-and-format/148293 "2008-09-11T12:50:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![konstantin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/858c86/32.png) [@konstantin](https://www.ruby-forum.com/u/konstantin)\
**Post date:** [September 11, 2008, 12:50pm UTC](https://www.ruby-forum.com/t/respond-to-and-format/148293/1 "2008-09-11T12:50:47Z")

</div>

Hello!

I use a “format” parameter in my application for internal calculations.  
But Rails catches it and uses for view name.  
I mean, if I go to url:

> **[应用宝官网-全网最新最热手机应用游戏下载](https://sj.qq.com)**
>
> 应用宝是腾讯旗下官方手机app应用商店，致力于为您提供海量、优质、安全、最新的安卓应用游戏下载！

Rails tries to show me index.xml.erb view, but I don’t want this! I want  
the application to continue showing index.html.erb template.  
How can I do this?

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![konstantin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/858c86/32.png) [@konstantin](https://www.ruby-forum.com/u/konstantin)\
**Post date:** [September 11, 2008, 1:07pm UTC](https://www.ruby-forum.com/t/respond-to-and-format/148293/2 "2008-09-11T13:07:48Z")

</div>

wrong url?  
check “[myapp.com/foo.xml](http://myapp.com/foo.xml)”

---

<div class="post-metadata">

**Author:** ![konstantin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/858c86/32.png) [@konstantin](https://www.ruby-forum.com/u/konstantin)\
**Post date:** [September 11, 2008, 3:51pm UTC](https://www.ruby-forum.com/t/respond-to-and-format/148293/3 "2008-09-11T15:51:45Z")

</div>

On 11 ÓÅÎÔ, 15:06, cheef [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> wrong url?  
> check “[myapp.com/foo.xml](http://myapp.com/foo.xml)”

No, no, the task was exactly reverse.  
I want to see normal html template (and not xml), but if I pass  
“format=xml” as a query parameter, Rails will try to display xml  
template (which doesn’t exist)  
How to avoid this? I want html to be displayed always and don’t depent  
on query parameters.
