responds_to_parent do
render :update do |page|
page << "tb_remove"
item_link = params[:controller].eql?("compliance_items") ? edit_compliance_compliance_item_path(master, @master_item) : edit_controls_item_path(@master_item)
# page.redirect_to(item_link + "?token=#{params[:token]}")
end
end
Hi in the above code I am gettign double render error(subject line is the error )… can anybody please help?
it is also vary bad to – stack over flow is not giving any option to create a new tag without reputation..!!!
You cannot call both
renderandredirect_to. That is what you have done (callingredirect_toinside therenderblock.To redirect in some cases, you will need to move the
ifcondition outside therenderblock. Try something like this:Where
I_need_to_redirectshould be replaced with the condition for checking whether you should redirect (if false, it should render instead).