Change an http_request to xml_http_request

not a joke…

I am updating an Ajax Form in a method, if correct, I need to redirect
to the list action and perform a partial redisplay of the list, but the
redirect request is NOT an xml_http_request, so I got the layout… ,
how shoudl I write the redirect ? thanks

in my prop_controller

def update_my_prop

redirect_to (:action => “list_propositions”, :id => current_user )
and return if updateOK
#if not the render via update_my_prop.rjs
end

def list_props

if request.xml_http_request?
render :partial => “list_items”, :layout => false
end
end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs