Changed render into redirect_to.