Render :layout => false still renders

Are there some exceptions to this command? I was having problems with
an ajax form still rendering the layout, then copy-pasted this code from
an ebook to test it and it gives a “template is missing” error as though
it’s still trying to render.

def reverse
@reversed_text = params[:text_to_reverse].reverse
render :layout => false
end

<%= form_remote_tag :update => “reversed”,
:url => { :action => ‘reverse’ } %>

Text to reverse: <%= text_field_tag 'text_to_reverse' %>

<%= submit_tag 'Reverse!' %>

<%= end_form_tag %>

Suggestions?

Suggestions?
maybe a render :inline => @reversed_text, :layout => false

that works, thanks

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 tag

for the topic checkout the api-manual
ActionController::Base

or the best book about it :slight_smile:
http://www.pragmaticprogrammer.com/titles/rails/index.html

On 15 Mai, 21:34, Aaron W. removed_email_address@domain.invalid