Redirect issue

Dear Friendz,

I have found a unique issue. This is the first time iam getting a issue
like this. I have created a add, delete page. after adding or deleting
functionality it should redirect to list page. Everything was working
fine for last two months suddenly from yetserday the page was not
redirected properly to list page after add or delete. That too it works
fine in firefox but doesnt redirect in IE.

Could anyone please suggest on this issue.

Code:

def delete_company
#------------
if params[:id] and params[:id1]
@policy = PolicySetting.find_by_id(params[:id])
@policyinfo = PolicySetting.find_by_id(params[:id1])
@policy_name = @policy.policy_name
if !(@policyinfo.nil?)
@policy_count = PolicySetting.find(:all, :conditions =>
{:policy_name => @policy_name, :policy_type =>
‘C’})
if @policy_count.length > 1
if params[:id].to_i == params[:id1].to_i
if @policyinfo.destroy
@policy = PolicySetting.find(:first, :conditions =>
{:policy_name => @policy_name, :policy_type
=> ‘C’})
flash[:notice] = “Selected company has been successfully
removed”
redirect_to :controller => ‘policies’, :action =>
‘companies’,
:id => @policy.id
end
else
if @policyinfo.destroy
flash[:notice] = “Selected company has been
successfully
removed”
redirect_to :controller => ‘policies’, :action =>
‘companies’, :id => params[:id]
end
end
end

  else

    flash[:error] ="Selected company has been alredy deleted"

    redirect_to :controller => 'policies', :action => 'companies',

:id => params[:id]

  end
end

end

Thanks in advance

Regards,
Jose Martin

could anyone have suggestions on why its so? and any possible solution.

Also in IE too when proxy settings were applied it works fine and when
proxy is not applied it shows HTTP 400 error after redirect_to method

Regards,
Jose

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