# Render :text sometimes rendering HTML?

**URL:** <https://www.ruby-forum.com/t/render-text-sometimes-rendering-html/127994>\
**Category:** Rails\
**Created:** [February 4, 2008, 1:51am UTC](https://www.ruby-forum.com/t/render-text-sometimes-rendering-html/127994 "2008-02-04T01:51:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fjan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/6de8d8/32.png) [@fjan](https://www.ruby-forum.com/u/fjan)\
**Post date:** [February 4, 2008, 1:51am UTC](https://www.ruby-forum.com/t/render-text-sometimes-rendering-html/127994/1 "2008-02-04T01:51:39Z")

</div>

This one really stumps me:

def hello  
render :text =\> ‘hi there’  
end

Renders with content-type ‘html/text’ most of the time. But not  
always, sometimes it has the type ‘text/plain’.

For example:  
http::localhost:3000/controller/hello/rob.txt # renders as text  
http::localhost:3000/controller/hello/robots.txt # renders as html

the relevant line in my routes.rb is:  
map.connect ‘:controller/:action/:id.:format’

any ideas?? DId I hit a bug?
