# Probably a very dumb question

**URL:** <https://www.ruby-forum.com/t/probably-a-very-dumb-question/51101>\
**Category:** Rails\
**Created:** [December 26, 2005, 11:30am UTC](https://www.ruby-forum.com/t/probably-a-very-dumb-question/51101 "2005-12-26T11:30:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [December 26, 2005, 11:30am UTC](https://www.ruby-forum.com/t/probably-a-very-dumb-question/51101/1 "2005-12-26T11:30:29Z")

</div>

why does \<%= render\_text “hey ya” %\>

cause ‘undefined method `render\_text’ for  
#\<#Class:0x3851120:0x3851000\>’

can i use render text in a template?

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [December 26, 2005, 11:47am UTC](https://www.ruby-forum.com/t/probably-a-very-dumb-question/51101/2 "2005-12-26T11:47:58Z")

</div>

Pete,

It has a changed syntax (see: [http://api.rubyonrails.org/](http://api.rubyonrails.org/))

Rendering of text is usually used for tests or for rendering prepared  
content,  
such as a cache. By default, text rendering is not done within the  
active  
layout.

# Renders the clear text “hello world” with status code 200

render :text =\> “hello world!”

Deprecation notice: This used to have the signature render\_text(“text”,  
status  
= 200)

On Monday 26 December 2005 11:30, removed\_email\_address@domain.invalid tried to type  
something  
like:

> why does \<%= render\_text “hey ya” %\>
> 
> cause ‘undefined method `render\_text’ for  
> #\<#Class:0x3851120:0x3851000\>’
> 
> can i use render text in a template?

–  
“Who cares if it doesn’t do anything? It was made with our new  
Triple-Iso-Bifurcated-Krypton-Gate-MOS process …”

My $Grtz =~ Gerard;  
~  
:wq!

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [December 26, 2005, 12:15pm UTC](https://www.ruby-forum.com/t/probably-a-very-dumb-question/51101/3 "2005-12-26T12:15:11Z")

</div>

removed\_email\_address@domain.invalid wrote:

> why does \<%= render\_text “hey ya” %\>
> 
> cause ‘undefined method `render\_text’ for  
> #\<#Class:0x3851120:0x3851000\>’
> 
> can i use render text in a template?

There’s no need to - all you need here is

\<%= “hey ya” %\>

(assuming that “hey ya” is a placeholder for something more dynamic - if  
it was just static text it should be part of the template itself).

The render method is a controller method.

regards

Justin
