hi,
I got an ajax form that can post values to controller to create
item.(simply an form_remote_for )then redirect to another page.
however, the response is include the app/view/layout/application.rthml.
so my refresh
nested into another page.
is that any better way to doing this?
my code look like this:
<% form_remote_for :location, :update=>‘content’, :url => ‘/create’,
:html=>{:id =>‘location’} do |f| %>
…
<% end %>
I had a
content
in my page, so it will be replace my the ajax
response.
but the only thing is it include the layout which I don’t want.
is that any way to discard the layout?
Ghee wooi Ong wrote:
my code look like this:
<% form_remote_for :location, :update=>‘content’, :url => ‘/create’,
:html=>{:id =>‘location’} do |f| %>
…
<% end %>
I had a
content
in my page, so it will be replace my the ajax
response.
but the only thing is it include the layout which I don’t want.
is that any way to discard the layout?
In the controller when you can give like
render_without_layout : “view file name”
this will help I hope