[Sdrug] Re: Trying to redirect URL w/ parameters

Chris Abad chris at integralimpressions.com
Fri Jun 16 01:44:48 GMT 2006


Well, I found something that works:

def my_ajax_action
   redirect_url = http://www.domainname.com/search.cfm? 
variable1=2342432&variable2=234234234
   if request.xhr?
     render :update do |page|
       page.redirect_to :action => 'pass_through', :redirect_url =>  
redirect_url
     end
   else
      redirect_to(redirect_url)
   end
end

def pass_through
   redirect_to params[:redirect_url]
end


Let me know if you know a better way to do it.



More information about the Sdruby mailing list