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

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

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

<%= submit_tag 'Reverse!' %>

<%= end_form_tag %>


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

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

or the best book about it :slight_smile:

On 15 Mai, 21:34, Aaron W. [email protected]