try this:
render :text => @reversed_text, :layout => false
or with rjs
render :update do |page| page.replace_html "reversed", @reversed_text end
the layout is more a thing "around" a template you render; views/ layouts/application.rhtml for example is the best place to put in your html <head/> tag
for the topic checkout the api-manual ActionController::Base
or the best book about it http://www.pragmaticprogrammer.com/titles/rails/index.html