Probably a very dumb question

why does <%= render_text “hey ya” %>

cause ‘undefined method `render_text’ for
#<#Class:0x3851120:0x3851000>’

can i use render text in a template?

Pete,

It has a changed syntax (see: 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, [email protected] 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!

[email protected] 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