This action is called via an Ajax request… with a parameter :update
‘mypropForm’
def modify_prop
@ proposal = Proposal.find_by_id(params[:id])
modify the proposal attribute…
.....
if saved then redirect to proposal list
redirect_to(:action => "list_ proposal", :id => current_user ) and
return if @ proposal.save
if error : redisplay proposal with errors
render :update do |page|
page.replace_html 'mypropForm', :partial => 'myprop_form'
end
end
when saved, the redirect is performed… but the llist_ proposal action
doesn’t render the full layout as it should… it just render the
partial ! even if the redirect_to request is not an xml_http_request
…
why this :update parameter is still used anyway to get rid of it in the
redirect ?
thanks to Ajaxian gurus
kad